/* 
   SpecPro Premium Theme 
   Implementation of Brand Guidelines 2.0 (Night Mode & High-End visual polish)
*/

:root {
    /* Standard Mode (Day) - Champagne & Navy */
    --bg-primary: #FFFFFF;
    --bg-secondary: #FAF9F7;  /* Champagne */
    --bg-tertiary: #FAE4CC;
    --text-primary: #051B33;  /* Deep Navy */
    --text-secondary: #4A5568;
    --text-tertiary: #8A8A8A;
    --border-color: rgba(5, 27, 51, 0.06);
    --accent-primary: #679FDA; /* Sky Blue */
    --accent-glow: rgba(103, 157, 218, 0.2);
    --card-shadow-1: 0 1px 3px rgba(0,0,0,0.08), 0 4px 12px rgba(0,0,0,0.04);
    --card-shadow-2: 0 4px 12px rgba(0,0,0,0.08), 0 8px 24px rgba(0,0,0,0.06);
}

/* Night Mode - "High-End SaaS" Look */
body.dark-mode {
    --bg-primary: #0A0A0A;    /* Deep Black */
    --bg-secondary: #051B33;  /* Deep Navy */
    --bg-tertiary: #0A2647;   /* Midnight Blue */
    --text-primary: #FFFFFF;
    --text-secondary: #E5E7EB; /* Platinum */
    --text-tertiary: #9CA3AF;
    --border-color: rgba(255, 255, 255, 0.1);
    --accent-primary: #94C1F2; /* Light Sky Blue */
    --accent-glow: rgba(148, 193, 242, 0.4);
    --card-shadow-1: 0 4px 20px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.05);
    --card-shadow-2: 0 8px 30px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.1), 0 0 20px rgba(56, 189, 248, 0.15);
}

/* Global Transition */
body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    transition: background-color 0.3s cubic-bezier(0.4, 0, 0.2, 1), color 0.3s ease;
}

/* Typography Enhancements (skip Word/structured doc blocks — PE typography sheet styles .specpro-docx-block) */
h1:not(.specpro-docx-block),
h2:not(.specpro-docx-block),
h3:not(.specpro-docx-block),
h4:not(.specpro-docx-block),
h5:not(.specpro-docx-block),
h6:not(.specpro-docx-block) {
    color: var(--text-primary);
    letter-spacing: -0.025em; /* Tight tracking */
    font-weight: 300; /* Light weight as per guidelines */
}

/* Card Upgrades */
.card, .workspace-section, .modal-content, .login-container {
    background: var(--bg-secondary) !important;
    border: 1px solid var(--border-color) !important;
    box-shadow: var(--card-shadow-1) !important;
    border-radius: 16px !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(12px); /* Glassmorphism preparation */
}

.card:hover, .workspace-section:hover {
    transform: translateY(-4px);
    box-shadow: var(--card-shadow-2) !important;
    border-color: var(--accent-primary) !important;
}

/* Button Upgrades */
.btn-primary, .btn-section {
    background: linear-gradient(135deg, var(--accent-primary) 0%, #3b82f6 100%) !important; /* Gradient boost */
    color: white !important;
    border: none !important;
    box-shadow: 0 2px 8px var(--accent-glow) !important;
    font-weight: 500 !important;
    letter-spacing: 0.01em !important;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

/* "Shimmer" Effect on Primary Buttons */
.btn-primary::after, .btn-section::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(45deg, transparent 40%, rgba(255,255,255,0.2) 50%, transparent 60%);
    background-size: 200% 200%;
    animation: shimmer 3s infinite;
    z-index: -1;
}

@keyframes shimmer {
    0% { background-position: 200% 50%; }
    100% { background-position: -200% 50%; }
}

/* Input fields (exclude Project Elements pill switches — they use custom geometry/colors). */
input:not(.pe-et-switch-cb),
textarea,
select {
    background: var(--bg-primary) !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-primary) !important;
    border-radius: 8px !important;
    padding: 16px 20px !important;
    font-family: 'Inter', sans-serif;
    transition: all 0.2s ease;
}

input:not(.pe-et-switch-cb):focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--accent-primary) !important;
    box-shadow: 0 0 0 3px var(--accent-glow) !important;
    transform: translateY(-1px);
}

/* Dark Mode Specifics */
body.dark-mode .card, 
body.dark-mode .workspace-section {
    background: rgba(5, 27, 51, 0.7) !important; /* Slightly transparent for glass effect */
}

/* Spotlight Effect for Dark Mode Background */
body.dark-mode {
    background-image: 
        radial-gradient(circle at 50% 0%, rgba(56, 189, 248, 0.08) 0%, transparent 40%),
        linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 100% 100%, 40px 40px, 40px 40px;
    background-position: top center, center center, center center;
    background-attachment: fixed;
}

/* Navigation & Header */
header, .workspace-header {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
}

body.dark-mode header, 
body.dark-mode .workspace-header {
    background: rgba(5, 27, 51, 0.6) !important; /* Translucent Navy */
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

/* File Explorer Items */
.explorer-item {
    border-bottom: 1px solid var(--border-color);
    transition: background 0.2s;
}

.explorer-item:hover {
    background: var(--bg-secondary);
}

body.dark-mode .explorer-item:hover {
    background: rgba(148, 193, 242, 0.1); /* Subtle blue tint */
}

/* Breadcrumbs */
.breadcrumbs {
    background: transparent !important;
    border-bottom: 1px solid var(--border-color) !important;
}

.breadcrumbs a {
    color: var(--accent-primary) !important;
    position: relative;
    text-decoration: none;
}

.breadcrumbs a:hover {
    text-decoration: none;
    text-shadow: 0 0 8px var(--accent-glow);
}

/* Status Badges */
.status-bar {
    border-radius: 999px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.75rem;
}

/* Project Settings Modal Enhancements */
.settings-tab-btn:hover {
    color: var(--accent-primary) !important;
}

.orientation-option:hover .visual {
    border-color: var(--accent-primary) !important;
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.preset-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--card-shadow-1);
}
