/*
 * Tailwind v4 entrypoint for the default theme.
 */
@import "tailwindcss";

/*
 * Font Awesome Free for icons.
 */
@import "@fortawesome/fontawesome-free/css/all.min.css";

/* CSS-native source scanning for the active theme templates and scripts. */
@source "../../views/**/*.blade.php";
@source "../js/**/*.js";
/* parent theme files */
@source "../../../../vendor/ignite/themes/default/views/**/*.blade.php";
@source "../../../../vendor/ignite/themes/default/js/**/*.js";

/* DaisyUI is the primary semantic component layer for the theme. */
@plugin "daisyui" { themes: light --default; }

/*
 * Tailwind theme tokens.
 *
 * We use `inline` so these tokens can safely reference the single canonical
 * brand-value registry declared in :root below.
 */
@theme inline {
    --font-sans: var(--brand-font-sans);
    --color-primary: var(--brand-primary);
    --color-primary-soft: var(--brand-primary-soft);
    --color-primary-strong: var(--brand-primary-strong);
    --color-primary-content: var(--brand-primary-content);
    --color-secondary: var(--brand-secondary);
    --color-secondary-soft: var(--brand-secondary-soft);
    --color-secondary-strong: var(--brand-secondary-strong);
    --color-secondary-content: var(--brand-secondary-content);
    --color-accent: var(--brand-accent);
    --color-accent-soft: var(--brand-accent-soft);
    --color-accent-strong: var(--brand-accent-strong);
    --color-accent-content: var(--brand-accent-content);
    --color-brand-ink: var(--brand-ink);
    --color-brand-body: var(--brand-body);
    --color-brand-surface: var(--brand-surface);
    --color-brand-border: var(--brand-border);
}

/*
 * DaisyUI semantic theme variables for component classes like:
 * - .btn-primary
 * - .badge-secondary
 * - .alert-info
 *
 * DaisyUI has its own token registry, so we map it to the same canonical
 * brand-value registry instead of repeating raw color values here.
 */
@plugin "daisyui/theme" {
    name: "light";
    default: true;
    prefersdark: false;
    color-scheme: light;
    --color-primary: var(--brand-primary);
    --color-primary-content: var(--brand-primary-content);
    --color-secondary: var(--brand-secondary);
    --color-secondary-content: var(--brand-secondary-content);
    --color-accent: var(--brand-accent);
    --color-accent-content: var(--brand-accent-content);
    --color-neutral: var(--brand-body);
    --color-neutral-content: var(--brand-ink);
    --color-info: #0288cc;
    --color-info-content: #f0f9ff;
    --color-success: #05bb66;
    --color-success-content: #eeffff;
    --color-warning: #ddaa00;
    --color-warning-content: #ffffee;
    --color-error: #dd2626;
    --color-error-content: #fefefe;
    --radius-selector: 0.75rem;
    --radius-field: 0.75rem;
    --radius-box: 1rem;
    --size-selector: 0.25rem;
    --size-field: 0.25rem;
    --border: 1px;
    --depth: 1;
    --noise: 0;
}

/* Safelisted utilities for dynamic CMS-authored content and page-builder usage. */
@import "./utility-registry.css";

/* Legacy Bootstrap compatibility wrappers. */
@import "./components/bootstrap-compat.css";

/* Feature and page-specific component partials. */
@import "./components/account.css";
@import "./components/activities.css";
@import "./components/catalog.css";
@import "./components/contact.css";
@import "./components/dashboard.css";
@import "./components/datatables.css";
@import "./components/faq.css";
@import "./components/footer.css";
@import "./components/orders.css";
@import "./components/overview.css";
@import "./components/page.css";
@import "./components/participant.css";
@import "./components/profile.css";
@import "./components/site.css";
@import "./components/theme-shared.css";
@import "./components/trainings.css";
@import "./components/transactions.css";

/*
 * Base element defaults plus the canonical brand-value registry.
 *
 * :root is intentionally limited to raw brand values so those values only need
 * to change in one place. Tailwind utilities and DaisyUI components both map
 * back to these variables through their own token systems above.
 */
@layer base {
    :root {
        --brand-font-sans: "Open Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
        --brand-primary: #007766;
        --brand-primary-soft: color-mix(in oklab, var(--brand-primary) 50%, white);
        --brand-primary-strong: color-mix(in oklab, var(--brand-primary) 50%, black);
        --brand-primary-content: #ffffff;
        --brand-secondary: #119999;
        --brand-secondary-soft: color-mix(in oklab, var(--brand-secondary) 50%, white);
        --brand-secondary-strong: color-mix(in oklab, var(--brand-secondary) 50%, black);
        --brand-secondary-content: #ffffff;
        --brand-accent: #007733;
        --brand-accent-soft: color-mix(in oklab, var(--brand-accent) 12%, white);
        --brand-accent-strong: color-mix(in oklab, var(--brand-accent) 88%, black);
        --brand-accent-content: #ffffff;
        --brand-ink: #111111;
        --brand-body: #dddddd;
        --brand-surface: #ffffff;
        --brand-border: #66aaaa;
    }

    html {
        font-family: var(--font-sans);
    }

    body {
        @apply bg-base-200 font-sans text-base-content antialiased;
    }

    h1, h2, h3, h4, h5, h6 {
        @apply text-base-content;
    }

    a {
        @apply transition-colors duration-200 text-primary-strong;
    }

    input:not([type="checkbox"]):not([type="radio"]), select, textarea {
        @apply w-full rounded-xl border border-brand-border px-4 py-3 shadow-sm outline-none transition focus:border-primary focus:ring-2 focus:ring-primary/10;
    }

    input[type="checkbox"],
    input[type="radio"] {
        @apply h-4 w-4;
    }

    label {
        @apply mb-2 block text-sm font-medium;
    }

    hr {
        @apply border-0 border-t border-brand-border;
    }

    table {
        @apply w-full;
    }
}
