﻿/* CSS Variables and Custom Properties */

/* ===================================================================== */
/* === SHARED BASE VARIABLES === */
/* ===================================================================== */

:root {
    /* === TYPOGRAPHY === */
    --font-main: 'Poppins', system-ui;
    --font-inter: 'Inter', system-ui;
    --font-size: 16px;
}

/* === FONT SIZE SCALES === */
body[data-font-size="12"] {
    --font-size: 12px;
}

body[data-font-size="14"] {
    --font-size: 14px;
}

body[data-font-size="16"] {
    --font-size: 16px;
}

body[data-font-size="18"] {
    --font-size: 18px;
}

body[data-font-size="20"] {
    --font-size: 20px;
}

body[data-font-size="24"] {
    --font-size: 24px;
}

/* ===================================================================== */
/* === WEB APP VARIABLES (Main System) === */
/* ===================================================================== */

:root {
    /* === WEB APP LIGHT MODE (DEFAULT) === */
    --bg-primary: #ffffff;
    --bg-secondary: #f2f2f2;
    --bg-tertiary: #e8f4ff;
    --bg-quatenary: #e8f4ff;
    --bg-muted: #f8fafc;
    --border-color: #e1e1e1;
    --text-primary: #374151;
    --text-secondary: #4b5563;
    --button: #e5e5e5;
    --button-hover: #e9ecef;
    --element-hover: #e9ecef;
    --input-bg: #ffffff;
    --signature-green: #00bf02;
    --signature-red: #ef4444;
    --signature-blue: #6366f1;
    --signature-orange: #ff8400;
}

/* === WEB APP DARK MODE === */
body[data-theme="dark"] {
    --bg-primary: #15132F;
    --bg-secondary: #1B193A;
    --bg-tertiary: #4D3894;
    --bg-quatenary: #1d193a;
    --bg-muted: #294083;
    --border-color: #4D3894;
    --text-primary: #ffffff;
    --text-secondary: #a8c1ff;
    --button: #4D3894;
    --button-hover: #663BDD;
    --element-hover: #4D3894;
    --input-bg: #15132F;
}

    /* === WEB APP PATIENT VIEW OVERRIDES === */
    body[data-theme="dark"][data-view-mode="patient"] {
        --bg-primary: #5d44c4;
        --bg-secondary: #6857cb;
        --bg-tertiary: #7c6fe2;
        --bg-quatenary: #7c6fe2;
        --bg-muted: #4a318e;
        --border-color: #9180d7;
        --text-primary: #ffffff;
        --text-secondary: #c8bfff;
        --button: #8f7df2;
        --button-hover: #7c6acf;
        --element-hover: #7c6acf;
        --input-bg: #343541;
    }

body[data-theme="light"][data-view-mode="patient"] {
    --bg-primary: #202123;
    --bg-secondary: #343541;
    --bg-tertiary: #40414f;
    --bg-quatenary: #40414f;
    --border-color: #40414f;
    --text-primary: #fff;
    --text-secondary: #8e8ea0;
    --button: #565869;
    --button-hover: #5c6270;
    --element-hover: #5c6270;
    --input-bg: #343541;
}

/* ===================================================================== */
/* === LANDING PAGE VARIABLES === */
/* ===================================================================== */

:root {
    /* === LANDING PAGE LIGHT MODE (DEFAULT) === */
    --color-text-dark: #1f2937;
    --color-text-light: #4b5563;
    --color-text-gray: #6b7280;
    --color-text-footer: #9ca3af;
    --color-bg-primary: #ffffff;
    --color-background-light: #f9fafb;
    --color-background-dark: #111827;
    --color-border: #e5e7eb;
    --color-button-hover: #374151;
    --color-white-overlay: rgba(255, 255, 255, 0.2);
}

/* === LANDING PAGE BRAND COLORS === */
:root {
    /* Default/nRich brand */
    --color-primary: #ffffff;
    --color-primary-dark: #ffffff;
    --color-secondary: #ffffff;
    --color-primary-hover: rgba(255, 255, 255, 0.1);
    --color-secondary-hover: rgba(229, 231, 235, 0.1);
    --color-white-hover: rgba(255, 255, 255, 0.9);
}

/* === LANDING PAGE DARK MODE === */
body[data-theme="dark"] {
    /* Override landing page colors with designer's dark mode */
    --color-text-dark: #ffffff;
    --color-text-light: #d1d5db;
    --color-text-gray: #9ca3af;
    --color-text-footer: #9ca3af;
    --color-bg-primary: #1f2937;
    --color-background-light: #111827;
    --color-background-dark: #1f2937;
    --color-border: #374151;
    --color-button-hover: #5a2db8;
    --color-white-overlay: rgba(255, 255, 255, 0.1);
}

/* === BRAND OVERRIDES === */
body[data-brand="chomi"] {
    --color-primary: #00bf02;
    --color-primary-dark: #00a002;
    --color-secondary: #ec4899;
    --color-primary-hover: rgba(0, 191, 2, 0.05);
}

body[data-brand="slm"] {
    --color-primary: #6366f1;
    --color-primary-dark: #4f46e5;
    --color-secondary: #f472b6;
    --color-primary-hover: rgba(99, 102, 241, 0.05);
}

/* === BRAND OVERRIDES FOR DARK MODE === */
body[data-theme="dark"][data-brand="chomi"] {
    --color-primary: #6f37d8;
    --color-primary-dark: #5a2db8;
    --color-secondary: #ec4899;
    --color-primary-hover: rgba(111, 55, 216, 0.1);
}

body[data-theme="dark"][data-brand="slm"] {
    --color-primary: #6f37d8;
    --color-primary-dark: #5a2db8;
    --color-secondary: #ec4899;
    --color-primary-hover: rgba(111, 55, 216, 0.1);
}

/* ===================================================================== */
/* === WEB APP SPECIFIC STYLES === */
/* ===================================================================== */

/* Selected state - light blue */
body[data-theme="light"] .warmth-option input[type="radio"]:checked + label {
    background-color: #e8f4ff;
}

/* Hover state - light gray */
body[data-theme="light"] .warmth-option label:hover {
    background-color: #f8fafc;
}

/* Selected state - light blue */
body[data-theme="light"] .security-option input[type="radio"]:checked + label {
    background-color: #e8f4ff;
}

/* Hover state - light gray */
body[data-theme="light"] .security-option label:hover {
    background-color: #f8fafc;
}

body[data-theme="light"] .ai-provider-option input[type="radio"]:checked + label {
    background-color: #e8f4ff;
}

body[data-theme="light"] .ai-provider-option label:hover {
    background-color: #f8fafc;
}

body[data-theme="dark"] .sentiment-emoji:hover {
    transform: scale(1.1);
    background-color: var(--element-hover);
}

body[data-theme="light"] .sentiment-emoji:hover {
    transform: scale(1.1);
    background-color: #3B82F6;
    border-color: #3B82F6;
}

body[data-theme="dark"] .sentiment-emoji.selected {
    background-color: var(--bg-tertiary);
    border-color: var(--button);
    transform: scale(1.1);
}

body[data-theme="light"] .sentiment-emoji.selected {
    background-color: #3B82F6;
    border-color: #3B82F6;
    transform: scale(1.1);
    box-shadow: 0 0 3px rgba(37, 99, 235, 0.5);
}

body[data-theme="light"] .music-survey-panel {
    background-color: var(--bg-primary);
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

body[data-theme="dark"] .music-survey-panel {
    background-color: var(--bg-primary);
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 10px #000000;
}

body[data-theme="dark"] .progress-dot.active {
    background-color: var(--bg-tertiary);
    border-color: var(--button);
    transform: scale(1.2);
    box-shadow: 0 0 3px var(--button-hover);
}

body[data-theme="light"] .progress-dot.active {
    background-color: #3B82F6;
    border-color: #3B82F6;
    transform: scale(1.2);
    box-shadow: 0 0 3px rgba(37, 99, 235, 0.5);
}

body[data-theme="dark"] .mobile-music-panel {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

body[data-theme="dark"] .theme-aware-image.chomi-icon {
    content: url('/images/chomi-device.png');
}

body[data-theme="light"] .theme-aware-image.chomi-icon {
    content: url('/images/chomi-device-light.png');
}

body[data-theme="slm-dark"] .theme-aware-image.soundslikeme-icon {
    content: url('/images/soundslikeme-device.png');
}

body[data-theme="light"] .theme-aware-image.soundslikeme-icon {
    content: url('/images/soundslikeme-device-light.png');
}

body[data-theme="dark"][data-system="nrich"] .sentiment-emoji:hover {
    transform: scale(1.1);
    background-color: var(--element-hover);
}

body[data-theme="dark"][data-system="nrich"] .sentiment-emoji.selected {
    background-color: var(--bg-tertiary);
    border-color: var(--button);
    transform: scale(1.1);
}

body[data-theme="dark"][data-system="nrich"] .music-survey-panel {
    background-color: var(--bg-primary);
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 10px #000000;
}

body[data-theme="dark"][data-system="nrich"] .progress-dot.active {
    background-color: var(--bg-tertiary);
    border-color: var(--button);
    transform: scale(1.2);
    box-shadow: 0 0 3px var(--button-hover);
}

body[data-theme="dark"][data-system="nrich"] .mobile-music-panel {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.text-primary {
    color: var(--text-primary);
    font-weight: bold;
}

/* Input field styles */
input[type="text"],
input[type="email"],
input[type="password"],
textarea,
.settings-input,
.role-select,
#userInput,
#shareEmailInput {
    background-color: var(--input-bg) !important;
}
