/* 
 * Home Repair Verdict Engine - Professional Design Theme
 * Design Persona: Data Visualization Expert
 * Principles: Clarity, Trustworthiness, Modern Professionalism
 */

:root {
    /* Color Palette - Premium & Modern (Apple-esque) */
    --color-bg-body: #F5F5F7; /* Apple's off-white background */
    --color-bg-card: #FFFFFF;
    --color-text-primary: #1D1D1F; /* Apple's almost-black */
    --color-text-secondary: #86868B; /* Sophisticated gray */
    --color-text-tertiary: #A1A1A6;
    --color-border: #D2D2D7; /* Softer border */
    
    /* Brand & Accent Colors */
    --color-primary: #0071E3; /* Apple Blue */
    --color-primary-hover: #0077ED;
    --color-success: #34C759; /* Apple Green */
    --color-warning: #FF9F0A; /* Apple Orange */
    --color-danger: #FF3B30; /* Apple Red */
    --color-neutral: #E8E8ED;

    /* Structural Variables */
    --max-width-container: 980px; /* Tighter focus */
    --header-height: 48px; /* Sleeker header */
    --border-radius-card: 20px; /* Larger, smoother curvature */
    --border-radius-sm: 12px;
    
    /* Shadows - Soft & Diffused */
    --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.04);
    --shadow-hover: 0 12px 32px rgba(0, 0, 0, 0.08);

    /* Typography */
    --font-heading: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", "Segoe UI", Roboto, sans-serif;
    --font-body: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Segoe UI", Roboto, sans-serif;
}

/* Base Resets & Typography */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--color-bg-body);
    font-family: var(--font-body);
    color: var(--color-text-secondary);
    line-height: 1.6;
    font-size: 16px;
    /* Base size for readability */
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color 0.15s ease;
}

a:hover {
    color: var(--color-primary-hover);
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    color: var(--color-text-primary);
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -0.025em;
    /* Tight tracking for modern feel */
}

/* Layout Containers */
.app-container,
.verdict-container {
    width: 100%;
    max-width: var(--max-width-container);
    margin: 40px auto;
    padding: 0 24px;
    flex: 1;
    /* Pushes footer down */
}

/* 
 * COMPONENT: Cards
 * Used for Verdict Summary, Repair Lists, etc. 
 */
.card {
    background-color: var(--color-bg-card);
    border-radius: var(--border-radius-card);
    box-shadow: var(--shadow-card);
    border: 1px solid var(--color-border);
    padding: 32px;
    margin-bottom: 32px;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.card:hover {
    box-shadow: var(--shadow-hover);
}

/* 
 * HEADER DESIGN 
 * Minimal, Trustworthy, Functional 
 */
.site-header {
    height: var(--header-height);
    background-color: var(--color-bg-card);
    border-bottom: 1px solid var(--color-border);
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
}

.header-container {
    width: 100%;
    max-width: 1200px;
    /* Slightly wider for header */
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-logo {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--color-text-primary);
    letter-spacing: -0.04em;
}

/* 
 * BUTTONS & CTA
 */
.header-cta,
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: var(--color-primary);
    color: white !important;
    /* Force white text */
    font-weight: 600;
    padding: 10px 20px;
    border-radius: var(--border-radius-sm);
    font-size: 0.95rem;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(16, 185, 129, 0.2);
}

.header-cta:hover,
.btn-primary:hover {
    background-color: var(--color-primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(16, 185, 129, 0.3);
}

/* 
 * VERDICT SPECIFIC STYLES 
 */
.verdict-header {
    margin-bottom: 24px;
    border-bottom: 2px solid var(--color-bg-body);
    padding-bottom: 24px;
}

.verdict-header h1 {
    font-size: 2rem;
    margin-bottom: 16px;
}

/* Tier Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 9999px;
    /* Pill shape */
    font-size: 0.875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.badge.APPROVED {
    background-color: #D1FAE5;
    color: #065F46;
    border: 1px solid #34D399;
}

.badge.WARNING {
    background-color: #FEF3C7;
    color: #92400E;
    border: 1px solid #FCD34D;
}

.badge.DENIED {
    background-color: #FEE2E2;
    color: #991B1B;
    border: 1px solid #F87171;
}

/* Content Sections */
.section-title {
    font-size: 1.5rem;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-card {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius-card);
    overflow: hidden;
}

/* Data List Items */
/* Data List Items - Responsive Table Layout */
.data-item {
    padding: 24px;
    border-bottom: 1px solid var(--color-border);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

@media (min-width: 640px) {
    .data-item {
        flex-direction: row;
        justify-content: space-between;
        align-items: baseline;
    }

    .data-item>div:first-child {
        flex: 1;
        padding-right: 24px;
    }

    .data-cost {
        text-align: right;
        margin-top: 0;
        white-space: nowrap;
    }
}

.data-item:last-child {
    border-bottom: none;
}

.data-item h3 {
    font-size: 1.125rem;
    margin-bottom: 6px;
    color: var(--color-text-primary);
}

.data-meta {
    font-size: 0.875rem;
    color: var(--color-text-tertiary);
}

.data-cost {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--color-text-primary);
    font-size: 1.125rem;
    font-variant-numeric: tabular-nums;
    /* Critical for data tables */
    letter-spacing: -0.02em;
}

/* Context & Explanation Text */
.explanation-text {
    line-height: 1.7;
    color: var(--color-text-secondary);
    margin-bottom: 12px;
}

/* Footer Design */
.site-footer {
    background-color: #F3F4F6;
    /* Slightly darker than body */
    border-top: 1px solid var(--color-border);
    padding: 48px 0;
    margin-top: 60px;
    font-size: 0.875rem;
    color: var(--color-text-tertiary);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
}

.footer-credibility p {
    margin-bottom: 12px;
    color: var(--color-text-secondary);
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 12px;
    text-align: right;
}

.footer-disclaimer {
    max-width: 1200px;
    margin: 40px auto 0;
    padding: 24px 24px 0;
    border-top: 1px solid #E5E7EB;
    font-size: 0.75rem;
    color: #9CA3AF;
    line-height: 1.5;
}

/* Utilities */
.text-bold {
    font-weight: 700;
}

.text-success {
    color: var(--color-primary);
}

.text-warning {
    color: var(--color-warning);
}

.text-danger {
    color: var(--color-danger);
}

/* Responsive */
@media (max-width: 768px) {
    .site-header {
        height: auto;
        padding: 16px 0;
    }

    .header-container {
        flex-direction: column;
        gap: 16px;
    }

    .card {
        padding: 20px;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-links {
        text-align: center;
    }
}