/**
 * AirSign Custom DaisyUI Theme
 * =============================
 * Custom theme colors and styling for AirSign Cloud portals.
 *
 * This theme uses the cyberpunk-inspired color palette with
 * dark blue and cyan accents, optimized for digital signage management.
 *
 * Includes both dark (airsign) and light (airsign-light) themes.
 *
 * @version 2.0.0
 * @updated December 14, 2025
 */

/* ============================================================================
   AIRSIGN CUSTOM THEME - Dark Mode
   Based on DaisyUI theme variables
   ============================================================================ */

[data-theme="airsign"] {
    color-scheme: dark;

    /* Base colors */
    --b1: 30.857% 0.023 264.149; /* base-100 */
    --b2: 28.036% 0.019 264.182; /* base-200 */
    --b3: 26.346% 0.018 262.177; /* base-300 */
    --bc: 95% 0.051 180.801; /* base-content */

    /* Brand colors */
    --p: 43% 0.078 188.216; /* primary */
    --pc: 77% 0.152 181.912; /* primary-content */
    --s: 60% 0.118 184.704; /* secondary */
    --sc: 77% 0.152 181.912; /* secondary-content */
    --a: 77% 0.152 181.912; /* accent */
    --ac: 43% 0.078 188.216; /* accent-content */

    /* Neutral */
    --n: 24.731% 0.02 264.094; /* neutral */
    --nc: 82.901% 0.031 222.959; /* neutral-content */

    /* Semantic colors */
    --in: 91% 0.096 180.426; /* info */
    --inc: 43% 0.078 188.216; /* info-content */
    --su: 86.171% 0.142 166.534; /* success */
    --suc: 17.234% 0.028 166.534; /* success-content */
    --wa: 86.163% 0.142 94.818; /* warning */
    --wac: 17.232% 0.028 94.818; /* warning-content */
    --er: 82.418% 0.099 33.756; /* error */
    --erc: 63% 0.237 25.331; /* error-content */

    /* Border radius */
    --rounded-box: 2rem;
    --rounded-btn: 2rem;
    --rounded-badge: 2rem;

    /* Animations */
    --animation-btn: 0.25s;
    --animation-input: 0.2s;

    /* Border */
    --border-btn: 1px;

    /* Tab */
    --tab-border: 1px;
    --tab-radius: 1rem;
}

/* ============================================================================
   AIRSIGN LIGHT THEME
   Same brand colors, inverted backgrounds
   ============================================================================ */

[data-theme="airsign-light"] {
    color-scheme: light;

    /* Base colors - Inverted for light mode */
    --b1: 97% 0.008 264.149; /* base-100 - near white */
    --b2: 94% 0.012 264.182; /* base-200 - light gray */
    --b3: 90% 0.015 262.177; /* base-300 - slightly darker */
    --bc: 24.731% 0.02 264.094; /* base-content - dark text (same as dark neutral) */

    /* Brand colors - SAME as dark theme */
    --p: 43% 0.078 188.216; /* primary */
    --pc: 77% 0.152 181.912; /* primary-content */
    --s: 60% 0.118 184.704; /* secondary */
    --sc: 77% 0.152 181.912; /* secondary-content */
    --a: 77% 0.152 181.912; /* accent */
    --ac: 43% 0.078 188.216; /* accent-content */

    /* Neutral - Inverted */
    --n: 82.901% 0.031 222.959; /* neutral (swapped with nc) */
    --nc: 24.731% 0.02 264.094; /* neutral-content (swapped with n) */

    /* Semantic colors - SAME as dark theme */
    --in: 91% 0.096 180.426; /* info */
    --inc: 43% 0.078 188.216; /* info-content */
    --su: 86.171% 0.142 166.534; /* success */
    --suc: 17.234% 0.028 166.534; /* success-content */
    --wa: 86.163% 0.142 94.818; /* warning */
    --wac: 17.232% 0.028 94.818; /* warning-content */
    --er: 82.418% 0.099 33.756; /* error */
    --erc: 63% 0.237 25.331; /* error-content */

    /* Border radius - Same as dark */
    --rounded-box: 2rem;
    --rounded-btn: 2rem;
    --rounded-badge: 2rem;

    /* Animations */
    --animation-btn: 0.25s;
    --animation-input: 0.2s;

    /* Border */
    --border-btn: 1px;

    /* Tab */
    --tab-border: 1px;
    --tab-radius: 1rem;
}

/* ============================================================================
   BASE STYLES WHEN AIRSIGN THEME IS ACTIVE
   ============================================================================ */

[data-theme="airsign"] {
    /* Background using oklch notation */
    background-color: oklch(var(--b1));
    color: oklch(var(--bc));
}

[data-theme="airsign"] .navbar {
    background-color: oklch(var(--b2));
    border-bottom: 1px solid oklch(var(--b3));
}

[data-theme="airsign"] .drawer-side .menu {
    background-color: oklch(var(--b2));
}

/* Card shadows for depth */
[data-theme="airsign"] .card {
    background-color: oklch(var(--b2));
    box-shadow: 0 4px 6px -1px oklch(var(--b3) / 0.3);
}

/* Enhanced focus rings with primary color */
[data-theme="airsign"] .btn:focus-visible,
[data-theme="airsign"] .input:focus,
[data-theme="airsign"] .select:focus,
[data-theme="airsign"] .textarea:focus {
    outline: 2px solid oklch(var(--p));
    outline-offset: 2px;
}

/* Primary button with hover effect */
[data-theme="airsign"] .btn-primary {
    background-color: oklch(var(--p));
    color: oklch(var(--pc));
    border-color: oklch(var(--p));
}

[data-theme="airsign"] .btn-primary:hover {
    background-color: oklch(var(--pf));
    border-color: oklch(var(--pf));
}

/* Secondary button */
[data-theme="airsign"] .btn-secondary {
    background-color: oklch(var(--s));
    color: oklch(var(--sc));
    border-color: oklch(var(--s));
}

[data-theme="airsign"] .btn-secondary:hover {
    background-color: oklch(var(--sf));
    border-color: oklch(var(--sf));
}

/* Accent button */
[data-theme="airsign"] .btn-accent {
    background-color: oklch(var(--a));
    color: oklch(var(--ac));
    border-color: oklch(var(--a));
}

[data-theme="airsign"] .btn-accent:hover {
    background-color: oklch(var(--af));
    border-color: oklch(var(--af));
}

/* Table styling */
[data-theme="airsign"] .table {
    background-color: oklch(var(--b2));
}

[data-theme="airsign"] .table :where(thead, tbody) :where(tr:not(:last-child)),
[data-theme="airsign"] .table :where(thead, tbody) :where(tr:first-child:last-child) {
    border-bottom-color: oklch(var(--b3));
}

[data-theme="airsign"] .table :where(tbody tr):hover {
    background-color: oklch(var(--b3) / 0.5);
}

/* Modal styling */
[data-theme="airsign"] .modal-box {
    background-color: oklch(var(--b2));
    border: 1px solid oklch(var(--b3));
}

/* Dropdown styling */
[data-theme="airsign"] .dropdown-content {
    background-color: oklch(var(--b2));
    border: 1px solid oklch(var(--b3));
}

/* Badge styling with glow effect */
[data-theme="airsign"] .badge-primary {
    background-color: oklch(var(--p));
    color: oklch(var(--pc));
    box-shadow: 0 0 8px oklch(var(--p) / 0.3);
}

[data-theme="airsign"] .badge-secondary {
    background-color: oklch(var(--s));
    color: oklch(var(--sc));
}

[data-theme="airsign"] .badge-accent {
    background-color: oklch(var(--a));
    color: oklch(var(--ac));
    box-shadow: 0 0 8px oklch(var(--a) / 0.4);
}

/* Alert styling */
[data-theme="airsign"] .alert-info {
    background-color: oklch(var(--in) / 0.15);
    color: oklch(var(--in));
    border: 1px solid oklch(var(--in) / 0.3);
}

[data-theme="airsign"] .alert-success {
    background-color: oklch(var(--su) / 0.15);
    color: oklch(var(--su));
    border: 1px solid oklch(var(--su) / 0.3);
}

[data-theme="airsign"] .alert-warning {
    background-color: oklch(var(--wa) / 0.15);
    color: oklch(var(--wa));
    border: 1px solid oklch(var(--wa) / 0.3);
}

[data-theme="airsign"] .alert-error {
    background-color: oklch(var(--er) / 0.15);
    color: oklch(var(--er));
    border: 1px solid oklch(var(--er) / 0.3);
}

/* Progress bar */
[data-theme="airsign"] .progress {
    background-color: oklch(var(--b3));
}

[data-theme="airsign"] .progress-primary::-webkit-progress-value {
    background-color: oklch(var(--p));
}

[data-theme="airsign"] .progress-primary::-moz-progress-bar {
    background-color: oklch(var(--p));
}

/* Link styling */
[data-theme="airsign"] .link,
[data-theme="airsign"] .link-primary {
    color: oklch(var(--p));
}

[data-theme="airsign"] .link:hover,
[data-theme="airsign"] .link-primary:hover {
    color: oklch(var(--pf));
}

/* Input styling */
[data-theme="airsign"] .input,
[data-theme="airsign"] .textarea,
[data-theme="airsign"] .select {
    background-color: oklch(var(--b3));
    border-color: oklch(var(--b3));
    color: oklch(var(--bc));
}

[data-theme="airsign"] .input:focus,
[data-theme="airsign"] .textarea:focus,
[data-theme="airsign"] .select:focus {
    background-color: oklch(var(--b2));
    border-color: oklch(var(--p));
}

/* Stat card styling */
[data-theme="airsign"] .stat {
    background-color: oklch(var(--b2));
}

/* Stat value colors are controlled by individual text-* classes (text-primary, text-success, etc.) */
/* DO NOT override here - let semantic colors apply */
/* [data-theme="airsign"] .stat-value {
    color: oklch(var(--a));
} */

/* Menu active state */
[data-theme="airsign"] .menu :where(li > *):active,
[data-theme="airsign"] .menu :where(li > .active) {
    background-color: oklch(var(--p));
    color: oklch(var(--pc));
}

/* Checkbox and toggle styling */
[data-theme="airsign"] .checkbox:checked,
[data-theme="airsign"] .toggle:checked {
    background-color: oklch(var(--p));
    border-color: oklch(var(--p));
}

/* ============================================================================
   CUSTOM ENHANCEMENTS
   ============================================================================ */

/* Glowing effect for online status */
[data-theme="airsign"] .status-indicator.success,
[data-theme="airsign"] .connection-status.online {
    box-shadow: 0 0 12px oklch(var(--su) / 0.4);
}

/* Navbar with subtle gradient */
[data-theme="airsign"] .navbar {
    background: linear-gradient(135deg, oklch(var(--b2)) 0%, oklch(var(--b3)) 100%);
}

/* Card hover effect */
[data-theme="airsign"] .card-interactive:hover {
    border-color: oklch(var(--a) / 0.5);
    box-shadow: 0 0 20px oklch(var(--a) / 0.2);
    transform: translateY(-2px);
    transition: all 0.3s ease;
}

/* Cyberpunk-style divider */
[data-theme="airsign"] .divider::before,
[data-theme="airsign"] .divider::after {
    background-color: oklch(var(--p) / 0.3);
}

/* Loading spinner with primary color */
[data-theme="airsign"] .loading {
    border-color: oklch(var(--p));
}

/* Tab active state */
[data-theme="airsign"] .tab-active {
    color: oklch(var(--a));
    border-color: oklch(var(--a));
}

/* ============================================================================
   AIRSIGN LIGHT THEME - Specific Overrides
   ============================================================================ */

[data-theme="airsign-light"] {
    /* Light mode specific background */
    background-color: oklch(var(--b1));
    color: oklch(var(--bc));
}

[data-theme="airsign-light"] .navbar {
    background-color: oklch(var(--b1));
    border-bottom: 1px solid oklch(var(--b3));
}

[data-theme="airsign-light"] .card {
    background-color: oklch(var(--b1));
    box-shadow: 0 2px 8px -1px oklch(var(--b3) / 0.5);
}

[data-theme="airsign-light"] .input,
[data-theme="airsign-light"] .textarea,
[data-theme="airsign-light"] .select {
    background-color: oklch(var(--b1));
    border-color: oklch(var(--b3));
}

[data-theme="airsign-light"] .input:focus,
[data-theme="airsign-light"] .textarea:focus,
[data-theme="airsign-light"] .select:focus {
    background-color: oklch(var(--b1));
    border-color: oklch(var(--p));
}

[data-theme="airsign-light"] .modal-box {
    background-color: oklch(var(--b1));
    border: 1px solid oklch(var(--b3));
}

[data-theme="airsign-light"] .dropdown-content {
    background-color: oklch(var(--b1));
    border: 1px solid oklch(var(--b3));
}

[data-theme="airsign-light"] .table {
    background-color: oklch(var(--b1));
}

[data-theme="airsign-light"] .table :where(tbody tr):hover {
    background-color: oklch(var(--b2));
}

[data-theme="airsign-light"] .stat {
    background-color: oklch(var(--b1));
}

/* ============================================================================
   ACCESSIBILITY ENHANCEMENTS
   ============================================================================ */

/* High contrast for better readability - Dark theme */
@media (prefers-contrast: high) {
    [data-theme="airsign"] {
        --bc: 100% 0 0;
        --p: 50% 0.150 188.216;
        --a: 85% 0.200 181.912;
    }

    [data-theme="airsign-light"] {
        --bc: 0% 0 0;
        --p: 35% 0.100 188.216;
        --a: 65% 0.180 181.912;
    }
}

/* Reduced motion support - consolidated in airsign-design-tokens.css */

