/* Satoshi variable font */
@font-face {
    font-family: 'Satoshi';
    src: url('/static/fonts/Satoshi-Variable.woff2') format('woff2'),
         url('/static/fonts/Satoshi-Variable.woff') format('woff');
    font-weight: 300 900;
    font-display: swap;
    font-style: normal;
}
@font-face {
    font-family: 'Satoshi';
    src: url('/static/fonts/Satoshi-VariableItalic.woff2') format('woff2'),
         url('/static/fonts/Satoshi-VariableItalic.woff') format('woff');
    font-weight: 300 900;
    font-display: swap;
    font-style: italic;
}

/* ==========================================================================
   shadcn/ui Design Tokens — CSS Custom Properties (HSL)
   Each portal overrides these via data-theme attribute
   ========================================================================== */

:root {
    --radius: 0.5rem;
}

/* --- Legacy / Main app (indigo theme) --- */
[data-theme="legacy"] {
    --background: 210 20% 98%;
    --foreground: 222 84% 5%;
    --card: 0 0% 100%;
    --card-foreground: 222 84% 5%;
    --popover: 0 0% 100%;
    --popover-foreground: 222 84% 5%;
    --primary: 239 84% 67%;
    --primary-foreground: 210 40% 98%;
    --secondary: 210 40% 96%;
    --secondary-foreground: 222 47% 11%;
    --muted: 210 40% 96%;
    --muted-foreground: 215 16% 47%;
    --accent: 210 40% 96%;
    --accent-foreground: 222 47% 11%;
    --destructive: 0 84% 60%;
    --destructive-foreground: 210 40% 98%;
    --border: 214 32% 91%;
    --input: 214 32% 91%;
    --ring: 239 84% 67%;
    --success: 142 71% 35%;
    --success-foreground: 0 0% 100%;
    --warning: 38 92% 50%;
    --warning-foreground: 0 0% 100%;
}

/* --- Ops dashboard (coral + warm neutrals) --- */
[data-theme="ops"] {
    --background: 210 17% 98%;
    --foreground: 20 17% 9%;
    --card: 0 0% 100%;
    --card-foreground: 20 17% 9%;
    --popover: 0 0% 100%;
    --popover-foreground: 20 17% 9%;
    --primary: 15 72% 57%;
    --primary-foreground: 0 0% 100%;
    --secondary: 30 5% 96%;
    --secondary-foreground: 20 17% 9%;
    --muted: 30 6% 96%;
    --muted-foreground: 25 6% 45%;
    --accent: 30 5% 96%;
    --accent-foreground: 20 17% 9%;
    --destructive: 0 84% 60%;
    --destructive-foreground: 210 40% 98%;
    --border: 24 6% 90%;
    --input: 24 6% 90%;
    --ring: 15 72% 57%;
    --success: 142 71% 35%;
    --success-foreground: 0 0% 100%;
    --warning: 38 92% 50%;
    --warning-foreground: 0 0% 100%;
}

/* --- Client portal (electric blue + holographic) --- */
[data-theme="client"] {
    --background: 225 33% 99%;
    --foreground: 228 22% 13%;
    --card: 0 0% 100%;
    --card-foreground: 228 22% 13%;
    --popover: 0 0% 100%;
    --popover-foreground: 228 22% 13%;
    --primary: 228 68% 55%;
    --primary-foreground: 228 100% 97%;
    --secondary: 182 100% 21%;
    --secondary-foreground: 182 100% 94%;
    --muted: 224 14% 93%;
    --muted-foreground: 224 8% 37%;
    --accent: 224 14% 93%;
    --accent-foreground: 228 22% 13%;
    --destructive: 0 72% 48%;
    --destructive-foreground: 0 100% 97%;
    --border: 225 11% 63%;
    --input: 225 14% 78%;
    --ring: 228 68% 55%;
    --success: 120 100% 21%;
    --success-foreground: 0 0% 100%;
    --warning: 38 92% 50%;
    --warning-foreground: 0 0% 100%;
}

/* ==========================================================================
   shadcn/ui-inspired Component Base Styles
   Use alongside daisyUI classes or standalone
   ========================================================================== */

/* Card */
.shadcn-card {
    background-color: hsl(var(--card));
    color: hsl(var(--card-foreground));
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius);
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

/* Badge variants */
.shadcn-badge {
    display: inline-flex;
    align-items: center;
    border-radius: 9999px;
    padding: 0.125rem 0.625rem;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1.25rem;
    transition: colors 0.15s;
}
.shadcn-badge-default {
    background-color: hsl(var(--primary));
    color: hsl(var(--primary-foreground));
}
.shadcn-badge-secondary {
    background-color: hsl(var(--secondary));
    color: hsl(var(--secondary-foreground));
}
.shadcn-badge-destructive {
    background-color: hsl(var(--destructive));
    color: hsl(var(--destructive-foreground));
}
.shadcn-badge-outline {
    border: 1px solid hsl(var(--border));
    color: hsl(var(--foreground));
    background: transparent;
}
.shadcn-badge-success {
    background-color: hsl(var(--success));
    color: hsl(var(--success-foreground));
}

/* Custom overrides for CWR Generator */

/* CWR viewer line highlighting */
.cwr-line:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

/* Share validation indicator */
.share-valid {
    color: #16a34a;
}
.share-invalid {
    color: #dc2626;
}

/* Info tooltip */
.info-tip {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 15px;
    height: 15px;
    margin-left: 4px;
    border-radius: 50%;
    background-color: #d1d5db;
    color: #4b5563;
    font-size: 10px;
    font-weight: 700;
    font-style: normal;
    line-height: 1;
    cursor: help;
    vertical-align: middle;
    flex-shrink: 0;
}
.info-tip:hover {
    background-color: #6366f1;
    color: #fff;
}
.info-tip .info-tip-text {
    visibility: hidden;
    opacity: 0;
    position: absolute;
    z-index: 50;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    width: 260px;
    padding: 8px 10px;
    border-radius: 6px;
    background-color: #1f2937;
    color: #f3f4f6;
    font-size: 12px;
    font-weight: 400;
    line-height: 1.5;
    text-align: left;
    white-space: normal;
    pointer-events: none;
    transition: opacity 0.15s ease, visibility 0.15s ease;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,.1), 0 2px 4px -2px rgba(0,0,0,.1);
}
.info-tip .info-tip-text::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-width: 5px;
    border-style: solid;
    border-color: #1f2937 transparent transparent transparent;
}
.info-tip:hover .info-tip-text {
    visibility: visible;
    opacity: 1;
}
/* When tooltip would overflow left edge, align left */
.info-tip-left .info-tip-text {
    left: 0;
    transform: none;
}
.info-tip-left .info-tip-text::after {
    left: 8px;
    transform: none;
}

