﻿/* =========================================================
   ScpBld Design Tokens (Phase 1)
   Drop-in: colors, type, spacing, radius, surfaces
   ========================================================= */

:root {
    /* Brand */
    --brand-primary: #0066CC;
    --brand-primary-hover: #005BB8;
    /* App backgrounds */
    --bg-app: #F5F7FA;
    --bg-surface: #FFFFFF;
    --bg-surface-2: #F9FAFB; /* hover/alt surface */
    /* Text */
    --text-primary: #1A1A1B;
    --text-secondary: #6B7280;
    --text-muted: rgba(107, 114, 128, 0.85);
    /* Borders */
    --border: #E5E7EB;
    --border-strong: rgba(229, 231, 235, 0.95);
    /* Sidebar */
    --sidebar-bg: #0F172A;
    --sidebar-text: rgba(255, 255, 255, 0.92);
    --sidebar-muted: rgba(255, 255, 255, 0.70);
    --sidebar-hover: rgba(255, 255, 255, 0.08);
    /* Radius */
    --r-8: 8px;
    --r-12: 12px;
    --r-16: 16px;
    --r-pill: 999px;
    /* Spacing (4px scale) */
    --s-1: 4px;
    --s-2: 8px;
    --s-3: 12px;
    --s-4: 16px;
    --s-5: 24px;
    --s-6: 32px;
    --s-45: 20px;
    /* Typography */
    --font-sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
    --text-xs: 12px;
    --text-sm: 13px;
    --text-md: 14px;
    --text-lg: 16px;
    --fw-regular: 400;
    --fw-medium: 500;
    --fw-semibold: 600;
    --fw-bold: 700;
    --fw-black: 800;
    /* Focus ring */
    --focus: 0 0 0 3px rgba(0, 102, 204, 0.18);
    /* Subtle elevation (border-first aesthetic) */
    --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
    --shadow-md: 0 8px 24px rgba(15, 23, 42, 0.10);
}

/* =========================================================
   Base page styles (light touch)
   ========================================================= */

html, body {
    font-family: var(--font-sans);
    color: var(--text-primary);
    background: var(--bg-app);
}

a {
    color: var(--brand-primary);
}

    a:hover {
        color: var(--brand-primary-hover);
    }

:focus-visible {
    outline: none;
    box-shadow: var(--focus);
    border-radius: var(--r-8);
}

/* Better numeric alignment for totals/prices */
.tabular-nums {
    font-variant-numeric: tabular-nums;
}

/* =========================================================
   Reusable surfaces (you can apply these gradually)
   ========================================================= */

/* Card / panel surface */
.z-card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--r-16);
    box-shadow: var(--shadow-sm);
}

/* Softer inset container (for hover zones) */
.z-surface-2 {
    background: var(--bg-surface-2);
    border: 1px solid var(--border);
    border-radius: var(--r-12);
}

/* Section label style: “CABINETS & VANITIES” */
.z-section-label {
    font-size: var(--text-xs);
    font-weight: var(--fw-bold);
    letter-spacing: 0.10em;
    text-transform: uppercase;
    color: var(--text-secondary);
}

/* =========================================================
   Buttons (token-driven)
   ========================================================= */

.z-btn {
    appearance: none;
    border: 1px solid var(--border);
    background: var(--bg-surface);
    color: var(--text-primary);
    border-radius: var(--r-8);
    padding: 10px 14px;
    font-weight: var(--fw-semibold);
    font-size: var(--text-md);
    line-height: 1;
    cursor: pointer;
    transition: background 120ms ease, border-color 120ms ease, color 120ms ease, box-shadow 120ms ease, transform 80ms ease;
}

    .z-btn:hover {
        background: var(--bg-surface-2);
        border-color: var(--border-strong);
    }

    .z-btn:active {
        transform: translateY(1px);
    }

.z-btn--primary {
    background: var(--brand-primary);
    border-color: var(--brand-primary);
    color: #fff;
}

    .z-btn--primary:hover {
        background: var(--brand-primary-hover);
        border-color: var(--brand-primary-hover);
    }

.z-btn--ghost {
    background: transparent;
    border-color: var(--border);
    color: var(--text-primary);
}

.z-btn--danger {
    color: #dc2626;
    border-color: rgba(220, 38, 38, 0.55);
    background: transparent;
}

    .z-btn--danger:hover {
        background: rgba(220, 38, 38, 0.08);
        border-color: rgba(220, 38, 38, 0.70);
    }

/* =========================================================
   Chat bubble primitives (token-driven)
   ========================================================= */

.z-bubble {
    display: inline-block;
    max-width: 92%;
    padding: 10px 12px;
    border-radius: var(--r-16);
    font-size: var(--text-md);
    line-height: 1.3;
    white-space: pre-wrap;
    word-wrap: break-word;
    border: 1px solid transparent;
}

.z-bubble--ai {
    background: var(--bg-surface-2);
    color: var(--text-primary);
    border-color: var(--border);
    border-top-left-radius: var(--r-8);
}

.z-bubble--me {
    background: var(--brand-primary);
    color: #fff;
    border-top-right-radius: var(--r-8);
}

/* =========================================================
   App shell helpers (used in Phase 2, safe to add now)
   ========================================================= */

.z-app-bg {
    background: var(--bg-app);
}
