@import "tailwindcss";

/* Source paths for Tailwind to scan */
@source "../../vendor/laravel/framework/src/Illuminate/Pagination/resources/views/*.blade.php";
@source "../../storage/framework/views/*.php";
@source "../**/*.blade.php";
@source "../**/*.js";

/* ============================================
   DESIGN SYSTEM — Sistema de Invitaciones
   ============================================ */

@theme {
    /* Typography */
    --font-sans: 'Inter', ui-sans-serif, system-ui, -apple-system, sans-serif;
    --font-serif: 'Playfair Display', ui-serif, Georgia, serif;
    --font-display: 'Outfit', 'Inter', ui-sans-serif, system-ui, sans-serif;

    /* Brand Colors */
    --color-brand-50: #f0f4ff;
    --color-brand-100: #dbe4ff;
    --color-brand-200: #bac8ff;
    --color-brand-300: #91a7ff;
    --color-brand-400: #748ffc;
    --color-brand-500: #5c7cfa;
    --color-brand-600: #4c6ef5;
    --color-brand-700: #4263eb;
    --color-brand-800: #3b5bdb;
    --color-brand-900: #364fc7;

    /* Accent Colors */
    --color-accent-50: #fff0f6;
    --color-accent-100: #ffdeeb;
    --color-accent-200: #fcc2d7;
    --color-accent-300: #faa2c1;
    --color-accent-400: #f783ac;
    --color-accent-500: #f06595;
    --color-accent-600: #e64980;
    --color-accent-700: #d6336c;

    /* Success */
    --color-success-50: #ebfbee;
    --color-success-400: #69db7c;
    --color-success-500: #51cf66;
    --color-success-600: #40c057;

    /* Warning */
    --color-warning-50: #fff9db;
    --color-warning-400: #ffd43b;
    --color-warning-500: #fcc419;
    --color-warning-600: #fab005;

    /* Danger */
    --color-danger-50: #fff5f5;
    --color-danger-400: #ff6b6b;
    --color-danger-500: #fa5252;
    --color-danger-600: #f03e3e;

    /* Surface Colors (Dark Admin Theme) */
    --color-surface-50: #f8f9fa;
    --color-surface-100: #f1f3f5;
    --color-surface-200: #e9ecef;
    --color-surface-300: #dee2e6;
    --color-surface-400: #ced4da;
    --color-surface-500: #adb5bd;
    --color-surface-600: #868e96;
    --color-surface-700: #495057;
    --color-surface-800: #343a40;
    --color-surface-900: #212529;
    --color-surface-950: #111318;

    /* Shadows */
    --shadow-glow: 0 0 20px rgba(92, 124, 250, 0.15);
    --shadow-card: 0 1px 3px rgba(0, 0, 0, 0.08), 0 4px 12px rgba(0, 0, 0, 0.04);
    --shadow-card-hover: 0 4px 16px rgba(0, 0, 0, 0.12), 0 8px 32px rgba(0, 0, 0, 0.08);
    --shadow-sidebar: 4px 0 24px rgba(0, 0, 0, 0.06);

    /* Border Radius */
    --radius-xs: 0.25rem;
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;

    /* Animations */
    --animate-fade-in: fade-in 0.5s ease-out forwards;
    --animate-fade-in-up: fade-in-up 0.6s ease-out forwards;
    --animate-slide-in-left: slide-in-left 0.4s ease-out forwards;
    --animate-slide-in-right: slide-in-right 0.4s ease-out forwards;
    --animate-scale-in: scale-in 0.3s ease-out forwards;
    --animate-pulse-soft: pulse-soft 2s ease-in-out infinite;
    --animate-float: float 3s ease-in-out infinite;
    --animate-shimmer: shimmer 2s linear infinite;
}

/* ============================================
   KEYFRAME ANIMATIONS
   ============================================ */

@keyframes fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fade-in-up {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slide-in-left {
    from { opacity: 0; transform: translateX(-30px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes slide-in-right {
    from { opacity: 0; transform: translateX(30px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes scale-in {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes pulse-soft {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

@keyframes count-up {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes confetti-fall {
    0% { transform: translateY(-100vh) rotate(0deg); opacity: 1; }
    100% { transform: translateY(100vh) rotate(720deg); opacity: 0; }
}

/* ============================================
   UTILITY CLASSES
   ============================================ */

@utility glass {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

@utility glass-light {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

@utility glass-dark {
    background: rgba(17, 19, 24, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

@utility gradient-brand {
    background: linear-gradient(135deg, var(--color-brand-600), var(--color-accent-600));
}

@utility gradient-brand-subtle {
    background: linear-gradient(135deg, var(--color-brand-50), var(--color-accent-50));
}

@utility gradient-dark {
    background: linear-gradient(180deg, var(--color-surface-900), var(--color-surface-950));
}

@utility text-gradient {
    background: linear-gradient(135deg, var(--color-brand-400), var(--color-accent-400));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

@utility animate-delay-100 {
    animation-delay: 100ms;
}

@utility animate-delay-200 {
    animation-delay: 200ms;
}

@utility animate-delay-300 {
    animation-delay: 300ms;
}

@utility animate-delay-400 {
    animation-delay: 400ms;
}

@utility animate-delay-500 {
    animation-delay: 500ms;
}

/* ============================================
   BASE STYLES
   ============================================ */

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--color-surface-400);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-surface-500);
}

/* Selection */
::selection {
    background: var(--color-brand-200);
    color: var(--color-brand-900);
}

/* Focus Ring */
*:focus-visible {
    outline: 2px solid var(--color-brand-500);
    outline-offset: 2px;
}

/* Smooth transitions for interactive elements */
a, button, input, select, textarea {
    transition: all 0.2s ease;
}

/* ============================================
   ADMIN LAYOUT STYLES
   ============================================ */

.admin-sidebar {
    background: linear-gradient(180deg, var(--color-surface-900) 0%, var(--color-surface-950) 100%);
    box-shadow: var(--shadow-sidebar);
}

.admin-sidebar .nav-link {
    transition: all 0.2s ease;
    border-radius: var(--radius-lg);
}

.admin-sidebar .nav-link:hover {
    background: rgba(255, 255, 255, 0.06);
}

.admin-sidebar .nav-link.active {
    background: linear-gradient(135deg, var(--color-brand-600), var(--color-brand-700));
    box-shadow: 0 2px 8px rgba(76, 110, 245, 0.3);
}

/* Stat Cards */
.stat-card {
    background: white;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-card);
    transition: all 0.3s ease;
    border: 1px solid var(--color-surface-100);
}

.stat-card:hover {
    box-shadow: var(--shadow-card-hover);
    transform: translateY(-2px);
}

/* Event Cards */
.event-card {
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-card);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    border: 1px solid var(--color-surface-100);
}

.event-card:hover {
    box-shadow: var(--shadow-card-hover);
    transform: translateY(-4px);
}

/* Status Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.025em;
    text-transform: uppercase;
}

.badge-success {
    background: var(--color-success-50);
    color: var(--color-success-600);
}

.badge-warning {
    background: var(--color-warning-50);
    color: var(--color-warning-600);
}

.badge-danger {
    background: var(--color-danger-50);
    color: var(--color-danger-600);
}

.badge-info {
    background: var(--color-brand-50);
    color: var(--color-brand-600);
}

/* Progress Bar */
.progress-bar {
    height: 8px;
    border-radius: 4px;
    background: var(--color-surface-100);
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    border-radius: 4px;
    background: linear-gradient(90deg, var(--color-brand-500), var(--color-accent-500));
    transition: width 1s ease-out;
}

/* Table Styles */
.admin-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.admin-table th {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-surface-500);
    padding: 0.75rem 1rem;
    border-bottom: 2px solid var(--color-surface-100);
    text-align: left;
}

.admin-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--color-surface-50);
    vertical-align: middle;
}

.admin-table tbody tr {
    transition: background-color 0.15s ease;
}

.admin-table tbody tr:hover {
    background-color: var(--color-surface-50);
}

/* Form Styles */
.form-input {
    border: 1.5px solid var(--color-surface-200);
    border-radius: var(--radius-lg);
    padding: 0.625rem 1rem;
    font-size: 0.9375rem;
    transition: all 0.2s ease;
    background: white;
    width: 100%;
}

.form-input:focus {
    border-color: var(--color-brand-500);
    box-shadow: 0 0 0 3px rgba(92, 124, 250, 0.12);
    outline: none;
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--color-surface-700);
    margin-bottom: 0.375rem;
}

/* Button Styles */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: var(--radius-lg);
    transition: all 0.2s ease;
    cursor: pointer;
    border: none;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--color-brand-600), var(--color-brand-700));
    color: white;
    box-shadow: 0 2px 8px rgba(76, 110, 245, 0.25);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--color-brand-500), var(--color-brand-600));
    box-shadow: 0 4px 16px rgba(76, 110, 245, 0.35);
    transform: translateY(-1px);
}

.btn-secondary {
    background: var(--color-surface-100);
    color: var(--color-surface-700);
}

.btn-secondary:hover {
    background: var(--color-surface-200);
}

.btn-danger {
    background: linear-gradient(135deg, var(--color-danger-500), var(--color-danger-600));
    color: white;
    box-shadow: 0 2px 8px rgba(250, 82, 82, 0.25);
}

.btn-danger:hover {
    box-shadow: 0 4px 16px rgba(250, 82, 82, 0.35);
    transform: translateY(-1px);
}

.btn-success {
    background: linear-gradient(135deg, var(--color-success-500), var(--color-success-600));
    color: white;
}

.btn-ghost {
    background: transparent;
    color: var(--color-surface-600);
}

.btn-ghost:hover {
    background: var(--color-surface-50);
    color: var(--color-surface-800);
}

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.8125rem;
}

.btn-lg {
    padding: 0.875rem 1.75rem;
    font-size: 1rem;
}

.btn-icon {
    width: 2.25rem;
    height: 2.25rem;
    padding: 0;
    border-radius: var(--radius-md);
}

/* ============================================
   INVITATION PUBLIC STYLES
   ============================================ */

.invitation-section {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.invitation-section.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Countdown */
.countdown-item {
    text-align: center;
}

.countdown-value {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1;
}

.countdown-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    opacity: 0.7;
}

/* Confetti */
.confetti-piece {
    position: fixed;
    width: 10px;
    height: 10px;
    top: -10px;
    animation: confetti-fall 3s ease-in forwards;
    z-index: 9999;
}

/* RSVP Form on invitation page */
.rsvp-card {
    border-radius: var(--radius-2xl);
    padding: 2rem;
    transition: all 0.3s ease;
}

/* ============================================
   RESPONSIVE HELPERS
   ============================================ */

@media (max-width: 768px) {
    .countdown-value {
        font-size: 1.75rem;
    }
}
