/**
 * vars.css — Flowpeat Universal Design Tokens & Dynamic Tenant Branding
 * The single source of truth for dark-mode executive styling, colors, and layout variables.
 * Allows instant white-label re-branding per tenant by overriding --brand-primary and --brand-accent.
 */

:root {
    /* Dynamic Tenant Brand Accent (Injected from businesses.settings / tenant.config.json) */
    --brand-primary: #0ea5e9;
    --brand-primary-rgb: 14, 165, 233;
    --brand-accent: #0284c7;
    --brand-accent-hover: #0369a1;
    
    /* Executive Slate Dark Theme */
    --brand-bg: #090d16;
    --brand-surface: #111827;
    --brand-surface-hover: #1f2937;
    --brand-surface-raised: #1e293b;

    /* Text & Contrast */
    --text-primary: #f8fafc;
    --text-muted: #94a3b8;
    --text-subtle: #64748b;
    --text-inverse: #0f172a;

    /* Semantic Status */
    --color-success: #10b981;
    --color-warning: #f59e0b;
    --color-danger: #f43f5e;
    --color-info: #38bdf8;

    /* Borders & Shadows */
    --border-subtle: rgba(255, 255, 255, 0.08);
    --border-medium: rgba(255, 255, 255, 0.15);
    --border-active: var(--brand-primary);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 4px 14px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 12px 28px rgba(0, 0, 0, 0.6);

    /* Radii & Typography */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;

    /* Spacing Units */
    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing-md: 16px;
    --spacing-lg: 24px;
    --spacing-xl: 32px;

    /* Backward-Compatibility Aliases for Yes Ma'ams CSS */
    --brand-red: var(--brand-primary);
    --brand-black: var(--brand-bg);
    --brand-beige: var(--brand-surface);
    --admin-bg: var(--brand-bg);
    --admin-bg-darker: var(--brand-surface);
    --admin-accent: var(--brand-primary);
    --admin-border: var(--border-subtle);
    --text-main: var(--text-primary);
    --text-error: var(--color-danger);
    --shadow-standard: var(--shadow-md);
    --radius-standard: var(--radius-sm);

    /* 3D Tactile Input Depth Tokens */
    --input-bg: linear-gradient(180deg, #0b111e 0%, #111a2d 100%);
    --input-color: #f8fafc;
    --input-placeholder: #64748b;
    --input-border: 1px solid rgba(255, 255, 255, 0.12);
    --input-border-focus: #38bdf8;
    --input-shadow-3d: 
        inset 0 2px 4px rgba(0, 0, 0, 0.7),
        inset 0 1px 2px rgba(0, 0, 0, 0.5),
        0 1px 0 rgba(255, 255, 255, 0.08),
        0 2px 5px rgba(0, 0, 0, 0.4);
    --input-shadow-hover:
        inset 0 2px 5px rgba(0, 0, 0, 0.75),
        inset 0 1px 2px rgba(0, 0, 0, 0.6),
        0 1px 0 rgba(255, 255, 255, 0.12),
        0 3px 8px rgba(0, 0, 0, 0.5);
    --input-shadow-focus: 
        inset 0 1px 3px rgba(0, 0, 0, 0.6),
        0 0 0 3px rgba(14, 165, 233, 0.35),
        0 4px 16px rgba(14, 165, 233, 0.25);
}

/* ============================================================================
   Global 3D Tactile Form Controls
   Elevates inputs with physical chamber depth, beveled rim light & active glow
   ============================================================================ */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="tel"],
input[type="number"],
input[type="search"],
input[type="date"],
input[type="time"],
select,
textarea {
    width: 100%;
    box-sizing: border-box;
    background: var(--input-bg) !important;
    color: var(--input-color) !important;
    border: var(--input-border) !important;
    border-top: 1px solid rgba(0, 0, 0, 0.6) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.14) !important;
    box-shadow: var(--input-shadow-3d) !important;
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    font-size: 15px;
    line-height: 1.5;
    outline: none;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

select {
    appearance: none;
    -webkit-appearance: none;
    background-color: #0b111e !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2394a3b8'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E"), linear-gradient(180deg, #0b111e 0%, #111a2d 100%) !important;
    background-repeat: no-repeat, no-repeat !important;
    background-position: right 14px center, 0 0 !important;
    background-size: 16px, 100% 100% !important;
    padding-right: 38px !important;
    cursor: pointer;
}

select option {
    background-color: #0f172a !important;
    color: #f8fafc !important;
    padding: 10px 14px;
}

input::placeholder,
textarea::placeholder {
    color: var(--input-placeholder) !important;
    opacity: 0.85;
}

input:hover,
select:hover,
textarea:hover {
    border-color: rgba(255, 255, 255, 0.22) !important;
    box-shadow: var(--input-shadow-hover) !important;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--input-border-focus) !important;
    box-shadow: var(--input-shadow-focus) !important;
    transform: translateY(-1px);
}
