/* Cairo Font - Must be first */
@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@200;300;400;500;600;700;800;900&display=swap');

@import 'tailwindcss';
@import 'flatpickr/dist/flatpickr.css';
@import './scale.css';
@import './client-colors.css';
@import './client-semantic.css';
@import './client-effects.css';
@import './client-radius.css';
@import './client-spacing.css';
@import './client-typography.css';


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


@source '../../vendor/laravel/framework/src/Illuminate/Pagination/resources/views/*.blade.php';
@source '../../storage/framework/views/*.php';
@source '../**/*.blade.php';
@source '../**/*.js';
@source '../**/*.vue';

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

    /* Legacy Primary Colors (Bright Blue - Based on #0981c4) — renamed from --color-primary* to avoid collision with new design-system primary (green) in client.css */
    --color-legacy-primary: #0981c4;
    --color-legacy-primary-50: #E6F4FB;
    --color-legacy-primary-100: #CCE9F7;
    --color-legacy-primary-200: #99D3EF;
    --color-legacy-primary-300: #66BDE7;
    --color-legacy-primary-400: #33A7DF;
    --color-legacy-primary-500: #0991D7;
    --color-legacy-primary-600: #0981c4;
    --color-legacy-primary-700: #0771B0;
    --color-legacy-primary-800: #05619C;
    --color-legacy-primary-900: #045188;
    
    
    /* gray 50 */
    --color-background: oklch(98.5% 0.002 247.839);
    /* gray 100 */
    --color-background-secondary: oklch(96.7% 0.003 264.542);
    /* gray 300 */
    --color-background-tertiary: oklch(87.2% 0.01 258.338);
    /* gray 900 */
    --color-fg: oklch(21% 0.034 264.665);
    /* gray 700 */
    --color-fg-secondary: oklch(37.3% 0.034 259.733);
    /* gray 500 */
    --color-fg-muted: oklch(55.1% 0.027 264.364);
    
    
    /* gray 900 */
    --color-background-dark: oklch(21% 0.034 264.665);
    /* gray 800 */
    --color-background-dark-secondary: oklch(27.8% 0.033 256.848);
    /* gray 700 */
    --color-background-dark-tertiary:oklch(37.3% 0.034 259.733);
    /* gray 100 */
    --color-fg-dark: oklch(96.7% 0.003 264.542);
    /* gray 200 */
    --color-fg-dark-secondary: oklch(92.8% 0.006 264.531);
    /* gray 300 */
    --color-fg-dark-muted: oklch(87.2% 0.01 258.338);



    /* Legacy Secondary Colors (Bright Blue - Based on #0981c4) — renamed from --color-secondary* */
    --color-legacy-secondary-50: #E6F4FB;
    --color-legacy-secondary-100: #CCE9F7;
    --color-legacy-secondary-200: #99D3EF;
    --color-legacy-secondary-300: #66BDE7;
    --color-legacy-secondary-400: #33A7DF;
    --color-legacy-secondary-500: #0991D7;
    --color-legacy-secondary-600: #0981c4;
    --color-legacy-secondary-700: #0771B0;
    --color-legacy-secondary-800: #05619C;
    --color-legacy-secondary-900: #045188;
    --color-legacy-secondary: #0981c4;
    --color-legacy-secondary-light: #0991D7;
    --color-legacy-secondary-dark: #0771B0;

    /* Legacy Accent Colors (Stardust Pink / Cosmic Magenta) — renamed from --color-accent* */
    --color-legacy-accent-50: #FDF4FF;
    --color-legacy-accent-100: #FAE8FF;
    --color-legacy-accent-200: #F5D0FE;
    --color-legacy-accent-300: #F0ABFC;
    --color-legacy-accent-400: #E879F9;
    --color-legacy-accent-500: #D946EF;
    --color-legacy-accent-600: #C026D3;
    --color-legacy-accent-700: #A21CAF;
    --color-legacy-accent-800: #86198F;
    --color-legacy-accent-900: #701A75;
    --color-legacy-accent: #0771B0;
    --color-legacy-accent-light: #0981c4;
    --color-legacy-accent-dark: #0771B0;

    /* Legacy radius/shadow/blur — Tailwind original default values,
       renamed so the new design-system scale (client-radius.css /
       client-effects.css) can claim the bare xs/sm/md/lg/xl/2xl names. */
    --radius-legacy-xs: 0.125rem;
    --radius-legacy-sm: 0.25rem;
    --radius-legacy-md: 0.375rem;
    --radius-legacy-lg: 0.5rem;
    --radius-legacy-xl: 0.75rem;

    --shadow-legacy-xs: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-legacy-sm: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-legacy-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-legacy-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-legacy-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --shadow-legacy-2xl: 0 25px 50px -12px rgb(0 0 0 / 0.25);

    --blur-legacy-sm: 8px;
    --blur-legacy-md: 12px;
    --blur-legacy-lg: 16px;
    --blur-legacy-xl: 24px;
}

/* NOTE on max-w-*: max-w-md etc resolve named sizes (sm, md, lg, xl, 2xl...)
   via the matching --spacing-* entry before falling back to the default
   --container-* scale, so once client-spacing.css defines --spacing-md etc,
   every existing max-w-md (e.g. AuthLayout login card) silently collapsed to
   0.5rem instead of 28rem. Fixed by replacing those usages with literal
   arbitrary values (max-w-[28rem] etc) instead of a --container-legacy-*
   theme namespace, since --container-* is specially handled by the Tailwind
   theme parser (tied to the separate .container component config) and
   redeclaring it under a suffixed key breaks the build. */
tbody tr {
    will-change: background-color;
}

/* Remove will-change after transition */
tbody tr:not(:hover) {
    will-change: auto;
}
/* RTL Support */
[dir="rtl"] {
    direction: rtl;
}

[dir="ltr"] {
    direction: ltr;
}

/* Rich Text HTML Viewer Styles - Global */
.prose {

    /* Headings */
    h1,
    h2,
    h3,
    h4,
    h5,
    h6 {
        font-weight: 600;
        margin-top: 1em;
        margin-bottom: 0.5em;
        line-height: 1.3;
    }

    h1 {
        font-size: 1.5em;
    }

    h2 {
        font-size: 1.3em;
    }

    h3 {
        font-size: 1.2em;
    }

    h4 {
        font-size: 1.1em;
    }

    h5 {
        font-size: 1em;
    }

    h6 {
        font-size: 0.9em;
    }

    /* Paragraphs */
    p {
        margin-top: 0.5em;
        margin-bottom: 0.5em;
        line-height: 1.6;
    }

    /* Lists */
    ul,
    ol {
        margin-top: 0.5em;
        margin-bottom: 0.5em;
        padding-left: 1.5em;
        line-height: 1.6;
    }

    ul {
        list-style-type: disc;
    }

    ol {
        list-style-type: decimal;
    }

    li {
        margin-top: 0.25em;
        margin-bottom: 0.25em;
    }

    /* Links */
    a {
        color: #3b82f6;
        text-decoration: underline;
        word-break: break-word;
    }

    a:hover {
        color: #2563eb;
    }

    /* Text formatting */
    strong {
        font-weight: 600;
    }

    em {
        font-style: italic;
    }

    u {
        text-decoration: underline;
    }

    s {
        text-decoration: line-through;
    }

    /* Blockquotes */
    blockquote {
        border-left: 3px solid #e5e7eb;
        padding-left: 1em;
        margin: 1em 0;
        font-style: italic;
    }

    /* Code */
    code {
        background-color: #f3f4f6;
        padding: 0.2em 0.4em;
        border-radius: 0.25em;
        font-size: 0.9em;
        font-family: monospace;
    }

    pre {
        background-color: #f3f4f6;
        padding: 1em;
        border-radius: 0.5em;
        overflow-x: auto;
        margin: 1em 0;
    }

    pre code {
        background-color: transparent;
        padding: 0;
    }

    /* Images */
    img {
        max-width: 100%;
        height: auto;
        border-radius: 0.5em;
        margin: 1em 0;
    }

    /* Horizontal Rule */
    hr {
        border: none;
        border-top: 2px solid #e5e7eb;
        margin: 1.5em 0;
    }
}

/* Dark mode adjustments */
.prose-invert {
    a {
        color: #60a5fa;
    }

    a:hover {
        color: #93c5fd;
    }

    blockquote {
        border-left-color: #4b5563;
    }

    code {
        background-color: #374151;
        color: #e5e7eb;
    }

    pre {
        background-color: #374151;
    }

    hr {
        border-top-color: #4b5563;
    }
}

/* Ensure RTL support for lists */
.prose ul[dir="rtl"],
.prose ol[dir="rtl"] {
    padding-right: 1.5em;
    padding-left: 0;
}

/* Ensure proper text alignment based on direction */
.prose [dir="rtl"] {
    text-align: right;
}

.prose .ql-align-right {
    text-align: right;
}

.prose .ql-align-left {
    text-align: left;
}

.prose .ql-align-center {
    text-align: center;
}

.prose .ql-align-justify {
    text-align: justify;
}

/* Indent classes from Quill */
.prose .ql-indent-1 {
    padding-left: 3em;
}

.prose .ql-indent-2 {
    padding-left: 6em;
}

.prose .ql-indent-3 {
    padding-left: 9em;
}

.prose .ql-indent-4 {
    padding-left: 12em;
}

.prose .ql-indent-5 {
    padding-left: 15em;
}

.prose .ql-indent-6 {
    padding-left: 18em;
}

.prose .ql-indent-7 {
    padding-left: 21em;
}

.prose .ql-indent-8 {
    padding-left: 24em;
}

/* RTL indent */
.prose [dir="rtl"] .ql-indent-1 {
    padding-right: 3em;
    padding-left: 0;
}

.prose [dir="rtl"] .ql-indent-2 {
    padding-right: 6em;
    padding-left: 0;
}

.prose [dir="rtl"] .ql-indent-3 {
    padding-right: 9em;
    padding-left: 0;
}

.prose [dir="rtl"] .ql-indent-4 {
    padding-right: 12em;
    padding-left: 0;
}

.prose [dir="rtl"] .ql-indent-5 {
    padding-right: 15em;
    padding-left: 0;
}

.prose [dir="rtl"] .ql-indent-6 {
    padding-right: 18em;
    padding-left: 0;
}

.prose [dir="rtl"] .ql-indent-7 {
    padding-right: 21em;
    padding-left: 0;
}

.prose [dir="rtl"] .ql-indent-8 {
    padding-right: 24em;
    padding-left: 0;
}

/* Image handling in Quill editor */
.prose .ql-editor img {
    display: block;
    max-width: 50%;
    height: auto;
}

/* Video embeds */
.prose .ql-video {
    width: 100%;
    height: 400px;
}