/* Custom styles for The Workspace Pro */

.hero-bg {
    background-image: linear-gradient(rgba(0,0,0,0.65), rgba(0,0,0,0.65)), url('/static/images/products/bekant-desk-1600.jpg');
    background-size: cover;
    background-position: center;
}
.product-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
}
/* Custom scrollbar */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: #f1f1f1; }
::-webkit-scrollbar-thumb { background: #888; border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: #555; }
/* Ensure our custom colors are available as CSS variables for dark mode */
:root {
    --color-surface: #fefcf8;
    --color-card: #ffffff;
    --color-border: #e8e3da;
    --color-primary: #2a6b7e;
    --color-accent: #c86b4a;
    --font-family-display: 'Playfair Display', serif;
}
.dark {
    --color-surface: #0f172a;
    --color-card: #1e293b;
    --color-border: #334155;
    --color-primary: #4a8fa3; /* lighter teal for dark mode */
    --color-accent: #e48c6d; /* lighter terracotta for dark mode */
}
.bg-surface { background-color: var(--color-surface); }
.bg-card { background-color: var(--color-card); }
.border-border { border-color: var(--color-border); }
.text-primary { color: var(--color-primary); }
.text-accent { color: var(--color-accent); }
.bg-primary { background-color: var(--color-primary); }
.bg-accent { background-color: var(--color-accent); }
.gradient-text {
    background-image: linear-gradient(to right, var(--color-primary), var(--color-accent));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.font-display { font-family: var(--font-family-display); }
/* ===== Dark Mode Overrides for Tailwind Utility Classes ===== */
html.dark body {
    background-color: var(--color-surface);
}
html.dark .text-white/90 { color: rgba(226, 232, 240, 0.9); }
html.dark .text-white { color: #f1f5f9; }
html.dark .text-text { color: #e2e8f0; }
html.dark .text-text-light { color: #94a3b8; }
html.dark .bg-white { background-color: var(--color-card); }
html.dark .bg-black/40 { background-color: rgba(0, 0, 0, 0.55); }
html.dark .bg-black/50 { background-color: rgba(0, 0, 0, 0.65); }
html.dark .border-border { border-color: var(--color-border); }
html.dark .shadow-lg,
html.dark .shadow-xl,
html.dark .shadow-sm {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -2px rgba(0, 0, 0, 0.3);
}
html.dark .bg-card { background-color: var(--color-card); }
html.dark .bg-surface { background-color: var(--color-surface); }
html.dark .text-primary { color: var(--color-primary); }
html.dark .hover\:bg-surface:hover { background-color: var(--color-surface); }
html.dark .hover\:text-primary:hover { color: var(--color-primary); }
html.dark .hover\:bg-border:hover { background-color: #475569; }
html.dark ::-webkit-scrollbar-track { background: #1e293b; }
html.dark ::-webkit-scrollbar-thumb { background: #475569; }
html.dark ::-webkit-scrollbar-thumb:hover { background: #64748b; }

/* Safety: ensure hidden class always works regardless of CSS load order */
.hidden { display: none !important; }

/* ==========================================
   POLISH PASS - Article Typography & Tables
   Tailwind prose plugin is not in the CDN
   build, so all prose-* classes are inert.
   These styles provide equivalent typography.
   ========================================== */

/* --- Prose content typography --- */
.prose {
    line-height: 1.75;
    color: #1f2937;
}
.dark .prose {
    color: #e2e8f0;
}

.prose > p,
.prose > section > p,
.prose > ol > li,
.prose > ul > li,
.prose > section > ol > li,
.prose > section > ul > li,
.prose p:not(.not-prose p),
.prose li:not(.not-prose li) {
    line-height: 1.8;
    margin-bottom: 1.25rem;
}

.prose > :last-child,
.prose > section > :last-child {
    margin-bottom: 0;
}

.prose h2 {
    font-size: 1.75rem;
    font-weight: 700;
    font-family: 'Playfair Display', serif;
    letter-spacing: -0.025em;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    color: #1f2937;
}
.dark .prose h2 {
    color: #f1f5f9;
}

.prose h3 {
    font-size: 1.375rem;
    font-weight: 700;
    font-family: 'Playfair Display', serif;
    letter-spacing: -0.025em;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
    color: #1f2937;
}
.dark .prose h3 {
    color: #e2e8f0;
}

.prose h4 {
    font-size: 1.125rem;
    font-weight: 700;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
    color: #1f2937;
}
.dark .prose h4 {
    color: #e2e8f0;
}

.prose ol,
.prose ul {
    padding-left: 1.5rem;
    margin-bottom: 1.25rem;
}

.prose ol {
    list-style-type: decimal;
}

.prose ul {
    list-style-type: disc;
}

.prose li {
    margin-bottom: 0.5rem;
    line-height: 1.75;
}

.prose li:last-child {
    margin-bottom: 0;
}

.prose a {
    color: #2a6b7e;
    text-decoration: none;
}
.dark .prose a {
    color: #4a8fa3;
}
.prose a:hover {
    text-decoration: underline;
}

.prose strong {
    font-weight: 700;
}

.prose img {
    border-radius: 0.75rem;
    margin-top: 1.5rem;
    margin-bottom: 1.5rem;
}

.prose hr {
    margin-top: 2.5rem;
    margin-bottom: 2.5rem;
    border-color: #e8e3da;
}
.dark .prose hr {
    border-color: #334155;
}

/* --- Blockquote / Callout styling --- */
.prose blockquote {
    border-left: 4px solid #2a6b7e;
    padding-left: 1.5rem;
    font-style: italic;
    margin-top: 1.5rem;
    margin-bottom: 1.5rem;
    color: #4b5563;
}
.dark .prose blockquote {
    border-left-color: #4a8fa3;
    color: #94a3b8;
}

/* --- Comparison & Data Tables --- */
.prose table,
article table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
    margin-bottom: 1.5rem;
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.prose table th,
article table th {
    background-color: #2a6b7e;
    color: #ffffff;
    font-weight: 700;
    text-align: left;
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.dark .prose table th,
.dark article table th {
    background-color: #1e293b;
    color: #f1f5f9;
}

.prose table td,
article table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #e8e3da;
    font-size: 0.9375rem;
    line-height: 1.6;
}
.dark .prose table td,
.dark article table td {
    border-bottom-color: #334155;
}

.prose table tr:nth-child(even),
article table tr:nth-child(even) {
    background-color: #f8f6f2;
}
.dark .prose table tr:nth-child(even),
.dark article table tr:nth-child(even) {
    background-color: #1a2332;
}

.prose table tr:last-child td,
article table tr:last-child td {
    border-bottom: none;
}

/* ==========================================
   MOBILE NAV POLISH
   ========================================== */
#mobileMenu {
    width: 18rem;
    max-width: 85vw;
}

#mobileMenu .flex-1.p-4 {
    padding: 0.75rem;
}

#mobileMenu a {
    padding: 0.625rem 0.75rem;
    font-size: 0.9375rem;
    gap: 0.625rem;
}

#mobileMenu a i.w-5 {
    width: 1.125rem;
    text-align: center;
}

#mobileMenu .border-t.p-4 {
    padding: 0.75rem;
}

/* Tighter in portrait on phones (<400px) */
@media (max-width: 400px) {
    #mobileMenu {
        width: 100vw;
        max-width: 100vw;
    }
    #mobileMenu .flex-1.p-4 {
        padding: 0.5rem;
    }
    #mobileMenu a {
        padding: 0.5rem 0.625rem;
        font-size: 0.875rem;
    }
}

/* ==========================================
   QUIZ RESULTS & CHECKLIST POLISH
   ========================================== */

/* Tighter spacing on product cards in quiz results */
#productCardsContainer .product-card {
    padding: 0.875rem;
}

#productCardsContainer .product-card .font-bold {
    font-size: 0.9375rem;
}

/* Checklist items */
#checklistContainer .checklist-item {
    padding: 0.625rem 0.75rem;
    margin-bottom: 0.375rem;
    border-radius: 0.5rem;
    background-color: var(--color-card);
    border: 1px solid var(--color-border);
    transition: background-color 0.15s;
}

#checklistContainer .checklist-item:hover {
    background-color: #f8f6f2;
}
.dark #checklistContainer .checklist-item:hover {
    background-color: #1a2332;
}

#checklistContainer .checklist-item label {
    display: flex;
    align-items: flex-start;
    gap: 0.625rem;
    cursor: pointer;
    font-size: 0.9375rem;
    line-height: 1.5;
}

#checklistContainer input[type="checkbox"]:checked + span {
    text-decoration: line-through;
    opacity: 0.6;
}

/* Email capture section polish */
#emailCaptureSection .bg-card {
    padding: 1.25rem;
}

/* Planner results polish */
#productRecs .rec-card {
    padding: 0.875rem;
}

#settingsGrid .rec-card {
    padding: 0.875rem;
}

/* ==========================================
   BUTTON IMPROVEMENTS (consistent sizing)
   ========================================== */

/* Guide/article call-to-action buttons */
.prose .not-prose a[class*="bg-primary"] {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

/* Quiz and planner action button consistency */
#downloadPlanBtn,
#downloadChecklistBtn,
#downloadPdfBtn {
    padding: 0.625rem 0.875rem;
    font-size: 0.8125rem;
    line-height: 1.4;
}

/* Planner next/prev buttons */
#nextBtn,
#prevBtn {
    padding: 0.625rem 1.25rem;
    font-size: 0.9375rem;
}

/* ==========================================
   PROSE DARK MODE COMPREHENSIVE OVERRIDES
   ========================================== */
html.dark .prose h2,
html.dark .prose h3,
html.dark .prose h4,
html.dark .prose p,
html.dark .prose li {
    color: #e2e8f0;
}

html.dark .prose h2,
html.dark .prose h3,
html.dark .prose h4 {
    color: #f1f5f9;
}
