/**
 * Katalyst Calculator — Shared Styles
 *
 * Single source of truth for all calculator visual styling.
 * Individual calculators @import this file, then add only their
 * calculator-specific overrides.
 *
 * Matches The Katalyst Team website design system:
 *   - Colors: charcoal (#1C1C1C), gold (#C9A84C), cream (#FAF7F3)
 *   - Fonts: Plus Jakarta Sans (headings), Inter (body)
 *   - Buttons: charcoal bg, gold text/border, shimmer on hover
 *   - Cards: white bg, warm border (#E5DFD8), subtle shadow
 *   - No blocky gold backgrounds, no one-sided accent borders
 */

/* ── Fonts ── */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=Inter:wght@300;400;500;600&display=swap');

/* ── Reset ── */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    overflow: hidden;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: #FAF7F3;
    margin: 0;
    padding: 0;
    overflow: hidden;
    color: #1C1C1C;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ── Container ── */
.container {
    max-width: 100%;
    margin: 0 auto;
    background: white;
    width: 100%;
    overflow: visible;
}

/* ── Header ── */
.header {
    background: linear-gradient(135deg, #1C1C1C 0%, #2a2a2a 100%);
    color: white;
    padding: 40px 24px;
    text-align: center;
    position: relative;
}

/* Subtle gold gradient line under header */
.header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(to right, transparent, #C9A84C, transparent);
}

.header h1 {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 2rem;
    margin-bottom: 8px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.01em;
}

.header p {
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    opacity: 0.7;
    line-height: 1.5;
    max-width: 600px;
    margin: 0 auto;
}

/* ── Eyebrow / Label ── */
.header .eyebrow,
.eyebrow {
    font-family: 'Inter', sans-serif;
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: #C9A84C;
    margin-bottom: 12px;
    display: block;
}

/* ── Branding Bar ── */
.branding-bar {
    text-align: center;
    padding: 12px 24px;
    background: #FAF7F3;
    border-bottom: 1px solid #E5DFD8;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: #6B6560;
}

/* ── Content ── */
.content {
    padding: 32px;
}

@media (max-width: 768px) {
    .content {
        padding: 20px;
    }
}

/* ── Section Cards ── */
.input-section,
.section {
    background: white;
    border: 1px solid #E5DFD8;
    border-radius: 12px;
    padding: 28px;
    margin-bottom: 24px;
}

.input-section h2,
.section h2,
.section-title {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 1.125rem;
    font-weight: 700;
    color: #1C1C1C;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid #E5DFD8;
}

/* ── Input Fields ── */
label,
.label {
    display: block;
    font-family: 'Inter', sans-serif;
    font-size: 0.9375rem;
    font-weight: 600;
    color: #1C1C1C;
    margin-bottom: 6px;
}

input[type="text"],
input[type="number"],
input[type="email"],
input[type="tel"],
select,
.calc-input {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid #E5DFD8;
    border-radius: 8px;
    font-family: 'Inter', sans-serif;
    font-size: 0.9375rem;
    color: #1C1C1C;
    background: white;
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
}

input[type="text"]:focus,
input[type="number"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
select:focus,
.calc-input:focus {
    border-color: #C9A84C;
    box-shadow: 0 0 0 3px rgba(201, 168, 76, 0.12);
}

input[readonly] {
    background: #F5F0EB;
    color: #1C1C1C;
    cursor: default;
}

/* ── Input Groups ── */
.input-group {
    margin-bottom: 16px;
}

.input-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

@media (max-width: 640px) {
    .input-row {
        grid-template-columns: 1fr;
    }
}

/* ── Input with prefix/suffix icon ── */
.input-wrapper {
    position: relative;
}

.input-wrapper .prefix {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #6B6560;
    font-weight: 600;
    font-size: 0.9375rem;
    pointer-events: none;
    z-index: 1;
}

.input-wrapper .suffix {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #6B6560;
    font-weight: 600;
    font-size: 0.9375rem;
    pointer-events: none;
    z-index: 1;
}

.input-wrapper input.has-prefix {
    padding-left: 28px;
}

.input-wrapper input.has-suffix {
    padding-right: 28px;
}

/* ── Range Sliders ── */
input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: #E5DFD8;
    outline: none;
    cursor: pointer;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    background: #1C1C1C;
    border: 2px solid #C9A84C;
    border-radius: 50%;
    cursor: pointer;
    transition: box-shadow 0.2s;
}

input[type="range"]::-webkit-slider-thumb:hover {
    box-shadow: 0 0 0 4px rgba(201, 168, 76, 0.15);
}

input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: #1C1C1C;
    border: 2px solid #C9A84C;
    border-radius: 50%;
    cursor: pointer;
}

/* ── Toggle Buttons ── */
.toggle-group {
    display: flex;
    border: 1.5px solid #E5DFD8;
    border-radius: 8px;
    overflow: hidden;
}

.toggle-btn {
    flex: 1;
    padding: 10px 16px;
    border: none;
    background: white;
    color: #6B6560;
    font-family: 'Inter', sans-serif;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.toggle-btn + .toggle-btn {
    border-left: 1.5px solid #E5DFD8;
}

.toggle-btn:hover {
    background: #FAF7F3;
}

.toggle-btn.active {
    background: #1C1C1C;
    color: #C9A84C;
}

/* ── Buttons — Primary ── */
.btn-primary,
.cta-button.primary,
.calculate-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 28px;
    background: #1C1C1C;
    color: #C9A84C;
    border: 1px solid #C9A84C;
    border-radius: 8px;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 0.9375rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.btn-primary:hover,
.cta-button.primary:hover,
.calculate-btn:hover {
    background: #2A2A2A;
    box-shadow: 0 8px 32px rgba(201, 168, 76, 0.15);
}

/* ── Buttons — Secondary ── */
.btn-secondary,
.cta-button.secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 28px;
    background: transparent;
    color: #1C1C1C;
    border: 1px solid #E5DFD8;
    border-radius: 8px;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 0.9375rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.btn-secondary:hover,
.cta-button.secondary:hover {
    border-color: #1C1C1C;
    color: #1C1C1C;
}

/* ── Button Shimmer Effect ── */
.btn-shimmer {
    position: relative;
    overflow: hidden;
}

.btn-shimmer::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        120deg,
        transparent 0%,
        transparent 30%,
        rgba(232, 213, 163, 0.25) 50%,
        transparent 70%,
        transparent 100%
    );
    transition: none;
    pointer-events: none;
}

.btn-shimmer:hover::before {
    left: 100%;
    transition: left 600ms ease-out;
}

/* ── CTA Section ── */
.cta-section {
    text-align: center;
    padding: 32px;
    background: #FAF7F3;
    border-radius: 12px;
    margin-top: 24px;
    border: 1px solid #E5DFD8;
}

.cta-section h3 {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
    color: #1C1C1C;
    margin-bottom: 8px;
}

.cta-section p {
    font-size: 0.875rem;
    color: #6B6560;
    margin-bottom: 20px;
}

.cta-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
}

/* ── Contact Modal ── */
.contact-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(28, 28, 28, 0.5);
    backdrop-filter: blur(4px);
    z-index: 10000;
    justify-content: center;
    align-items: center;
}

.contact-modal-overlay.active {
    display: flex;
}

.contact-modal {
    background: white;
    border-radius: 12px;
    padding: 36px;
    max-width: 480px;
    width: 90%;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.2);
    border: 1px solid #E5DFD8;
    position: relative;
}

.contact-modal h3 {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
    color: #1C1C1C;
    margin-bottom: 4px;
}

.contact-modal p {
    font-size: 0.875rem;
    color: #6B6560;
    margin-bottom: 20px;
}

.contact-modal .close-btn {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    font-size: 1.25rem;
    color: #6B6560;
    cursor: pointer;
    padding: 4px;
    line-height: 1;
    transition: color 0.2s;
}

.contact-modal .close-btn:hover {
    color: #1C1C1C;
}

.contact-modal form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.modal-submit {
    margin-top: 4px;
}

/* ── Results Section ── */
.results-section {
    background: white;
    border: 1px solid #E5DFD8;
    border-radius: 12px;
    padding: 28px;
    margin-top: 24px;
}

/* ── Payment Summary (dark card) ── */
.payment-summary {
    background: linear-gradient(135deg, #1C1C1C 0%, #2a2a2a 100%);
    border-radius: 12px;
    padding: 32px;
    color: white;
    position: relative;
}

.payment-summary::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(to right, transparent, rgba(201, 168, 76, 0.3), transparent);
    border-radius: 0 0 12px 12px;
}

.big-payment {
    text-align: center;
    padding: 24px;
    background: white;
    border-radius: 8px;
    margin-bottom: 20px;
}

.big-payment .label {
    font-size: 0.8125rem;
    color: #6B6560;
    margin-bottom: 4px;
}

.big-payment .amount {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 3rem;
    font-weight: 700;
    color: #1C1C1C;
    line-height: 1;
}

/* ── Breakdown Grid ── */
.breakdown-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

@media (max-width: 768px) {
    .breakdown-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.breakdown-card {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 14px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.breakdown-card .label {
    font-size: 0.8125rem;
    color: rgba(255, 255, 255, 0.8);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 4px;
    font-weight: 500;
}

.breakdown-card .value {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 1.125rem;
    font-weight: 600;
    color: white;
}

/* ── Stat / Result Cards ── */
.stat-card {
    background: white;
    border: 1px solid #E5DFD8;
    border-radius: 8px;
    padding: 16px;
    text-align: center;
}

.stat-card .stat-value {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: #1C1C1C;
}

.stat-card .stat-label {
    font-size: 0.8125rem;
    color: #6B6560;
    margin-top: 2px;
}

/* ── Comparison Table ── */
.comparison-table {
    width: 100%;
    border-collapse: collapse;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #E5DFD8;
}

.comparison-table thead th {
    background: #1C1C1C;
    color: white;
    padding: 14px 16px;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 0.875rem;
    font-weight: 600;
    text-align: left;
    letter-spacing: 0.02em;
}

.comparison-table tbody td {
    padding: 12px 16px;
    border-bottom: 1px solid #E5DFD8;
    font-size: 0.875rem;
    color: #1C1C1C;
}

.comparison-table tbody tr:last-child td {
    border-bottom: none;
}

.comparison-table tbody tr:hover {
    background: #FAF7F3;
}

/* ── Highlight / Best Option ── */
.highlight-value {
    color: #C9A84C;
    font-weight: 600;
}

.highlight-positive {
    color: #16a34a;
    font-weight: 600;
}

.highlight-negative {
    color: #dc2626;
    font-weight: 600;
}

/* ── Benefit Cards ── */
.benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.benefit-card {
    background: white;
    border: 1px solid #E5DFD8;
    border-radius: 8px;
    padding: 20px;
    transition: border-color 0.2s;
}

.benefit-card:hover {
    border-color: rgba(201, 168, 76, 0.3);
}

.benefit-card .benefit-icon {
    font-size: 1.5rem;
    margin-bottom: 8px;
}

.benefit-card h4 {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 0.9375rem;
    font-weight: 600;
    color: #1C1C1C;
    margin-bottom: 6px;
}

.benefit-card p {
    font-size: 0.875rem;
    color: #6B6560;
    line-height: 1.5;
}

/* ── Info / Disclaimer ── */
.disclaimer {
    font-size: 0.8125rem;
    color: #6B6560;
    line-height: 1.6;
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid #E5DFD8;
}

/* ── Tooltip ── */
.tooltip {
    position: relative;
    cursor: help;
    border-bottom: 1px dotted #6B6560;
}

.tooltip .tooltip-text {
    visibility: hidden;
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #1C1C1C;
    color: white;
    font-size: 0.75rem;
    padding: 8px 12px;
    border-radius: 6px;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.2s;
    pointer-events: none;
    z-index: 100;
}

.tooltip:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}

/* ── LO Contact Bar ── */
.lo-contact {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 12px 24px;
    font-size: 0.8125rem;
    color: #6B6560;
}

.lo-contact a {
    color: #C9A84C;
    text-decoration: none;
    transition: color 0.2s;
}

.lo-contact a:hover {
    color: #A08735;
}

/* ── Responsive ── */
@media (max-width: 768px) {
    .header {
        padding: 28px 20px;
    }

    .header h1 {
        font-size: 1.5rem;
    }

    .header p {
        font-size: 0.875rem;
    }

    .input-section,
    .section {
        padding: 20px;
    }

    .cta-section {
        padding: 24px;
    }

    .payment-summary {
        padding: 24px;
    }

    .big-payment .amount {
        font-size: 2.25rem;
    }

    .breakdown-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .cta-buttons {
        flex-direction: column;
    }

    .cta-buttons .btn-primary,
    .cta-buttons .btn-secondary,
    .cta-buttons .cta-button {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .content {
        padding: 16px;
    }

    .input-section,
    .section {
        padding: 16px;
    }
}

/* ── Print ── */
@media print {
    body {
        background: white;
    }
    .cta-section,
    .branding-bar,
    .btn-shimmer::before {
        display: none;
    }
}
