@import 'tailwindcss';
@import '../../vendor/livewire/flux/dist/flux.css';

@source '../views';
@source '../../vendor/laravel/framework/src/Illuminate/Pagination/resources/views/*.blade.php';
@source '../../vendor/livewire/flux-pro/stubs/**/*.blade.php';
@source '../../vendor/livewire/flux/stubs/**/*.blade.php';

@custom-variant dark (&:where(.dark, .dark *));

@theme {
    --font-sans: 'Instrument Sans', ui-sans-serif, system-ui, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';

    /* SB Admin 2 Color Palette */
    --color-primary: #4e73df;
    --color-secondary: #858796;
    --color-success: #1cc88a;
    --color-danger: #e74c3c;
    --color-warning: #f6c23e;
    --color-info: #36b9cc;
    --color-light: #f8f9fc;
    --color-dark: #2e3338;

    /* Neutral grays for SB Admin 2 */
    --color-zinc-50: #f8f9fc;
    --color-zinc-100: #f3f6f9;
    --color-zinc-200: #e3e6f0;
    --color-zinc-300: #d0d3d8;
    --color-zinc-400: #b7bcc7;
    --color-zinc-500: #858796;
    --color-zinc-600: #697281;
    --color-zinc-700: #525c70;
    --color-zinc-800: #3a4556;
    --color-zinc-900: #2e3338;
    --color-zinc-950: #1a1d23;

    --color-accent: #4e73df;
    --color-accent-content: #4e73df;
    --color-accent-foreground: #ffffff;
}

@layer theme {
    .dark {
        --color-accent: #4e73df;
        --color-accent-content: #4e73df;
        --color-accent-foreground: #ffffff;
    }
}

@layer base {
    *,
    ::after,
    ::before,
    ::backdrop,
    ::file-selector-button {
        border-color: #e3e6f0;
    }

    .dark *,
    .dark ::after,
    .dark ::before,
    .dark ::backdrop,
    .dark ::file-selector-button {
        border-color: #3a4556;
    }
}

[data-flux-field]:not(ui-radio, ui-checkbox) {
    @apply grid gap-2;
}

[data-flux-label] {
    @apply  !mb-0 !leading-tight;
}

input:focus[data-flux-control],
textarea:focus[data-flux-control],
select:focus[data-flux-control] {
    @apply outline-hidden ring-2 ring-accent ring-offset-2 ring-offset-accent-foreground;
}

/* \[:where(&)\]:size-4 {
    @apply size-4;
} */

@layer components {
    .table-reset {
        @apply min-w-full divide-y divide-[#e3e6f0] dark:divide-[#3a4556];
    }

    .table-reset thead th {
        @apply px-4 py-3 text-left text-xs font-semibold uppercase tracking-wider text-[#858796] dark:text-[#b7bcc7] bg-[#f8f9fc] dark:bg-[#2e3338];
    }

    .table-reset tbody {
        @apply bg-white dark:bg-[#1a1d23] divide-y divide-[#e3e6f0] dark:divide-[#3a4556];
    }

    .table-reset tbody tr {
        @apply hover:bg-[#f8f9fc] dark:hover:bg-[#2e3338] transition-colors;
    }

    .table-reset td {
        @apply px-4 py-3 text-sm text-[#525c70] dark:text-[#b7bcc7];
    }

    /* SB Admin 2 Button Styles */
    .btn-sb-primary {
        @apply bg-[#4e73df] text-white px-4 py-2 rounded-lg font-medium hover:bg-[#3d5cb8] transition-colors;
    }

    .btn-sb-secondary {
        @apply bg-[#858796] text-white px-4 py-2 rounded-lg font-medium hover:bg-[#6a7178] transition-colors;
    }

    .btn-sb-success {
        @apply bg-[#1cc88a] text-white px-4 py-2 rounded-lg font-medium hover:bg-[#159b6b] transition-colors;
    }

    .btn-sb-danger {
        @apply bg-[#e74c3c] text-white px-4 py-2 rounded-lg font-medium hover:bg-[#b83a2f] transition-colors;
    }

    .btn-sb-warning {
        @apply bg-[#f6c23e] text-[#2e3338] px-4 py-2 rounded-lg font-medium hover:bg-[#daa62f] transition-colors;
    }

    .btn-sb-info {
        @apply bg-[#36b9cc] text-white px-4 py-2 rounded-lg font-medium hover:bg-[#2999a3] transition-colors;
    }

    /* SB Admin 2 Card Styles */
    .card-sb {
        @apply bg-white dark:bg-[#1a1d23] border border-[#e3e6f0] dark:border-[#3a4556] rounded-lg shadow-sm;
    }

    /* SB Admin 2 Badge Styles */
    .badge-primary {
        @apply bg-[#4e73df] text-white px-2 py-1 rounded-full text-xs font-medium;
    }

    .badge-success {
        @apply bg-[#1cc88a] text-white px-2 py-1 rounded-full text-xs font-medium;
    }

    .badge-danger {
        @apply bg-[#e74c3c] text-white px-2 py-1 rounded-full text-xs font-medium;
    }

    .badge-warning {
        @apply bg-[#f6c23e] text-[#2e3338] px-2 py-1 rounded-full text-xs font-medium;
    }

    .badge-info {
        @apply bg-[#36b9cc] text-white px-2 py-1 rounded-full text-xs font-medium;
    }
}
