/* =========================================================
   downtime-calculator.css
   I/O Tech Services
   Styles specific to the Downtime Cost Calculator
   ========================================================= */

/* ---------- Form Layout ---------- */

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
}

.form-group:last-child {
    margin-bottom: 0;
}

.form-group label {
    font-weight: 600;
    color: var(--color-text);
}

.form-group small {
    color: var(--color-text-muted);
    font-size: var(--step--1);
    line-height: 1.5;
}

/* ---------- Inputs ---------- */

.form-group input[type="number"] {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    background: var(--color-bg);
    color: var(--color-text);
    transition: border-color 0.15s ease,
                box-shadow 0.15s ease;
}

.form-group input[type="number"]:hover {
    border-color: var(--color-accent);
}

.form-group input[type="number"]:focus {
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.15);
    outline: none;
}

/* ---------- Sliders ---------- */

.form-group input[type="range"] {
    width: 100%;
    margin-top: 0.25rem;
    accent-color: var(--color-accent);
    cursor: pointer;
}

.slider-display {
    display: flex;
    justify-content: center;
    margin-top: 0.25rem;
}

.slider-display span {
    display: inline-block;
    padding: 0.35rem 0.75rem;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 999px;
    font-weight: 600;
    color: var(--color-primary-contrast);
}

/* ---------- Results Cards ---------- */

.counter-display {
    font-size: clamp(4rem, 10vw, 6rem);	
    font-weight: 500;
    line-height: 1;
    color: #ef4444;
    text-align: center;
}

.live-counter {
    max-width: 600px;
    margin: 2rem auto;
    text-align: center;
}

.results-cards .card {
    text-align: center;
}

.result-value {
    margin: 0.5rem 0 0;
    font-size: var(--step-2);
    font-weight: 700;
    color: var(--color-primary);
    line-height: 1.2;
}

.results-cards .result-value {
    color: #ef4444;
}

.total-highlight {
    color: #b91c1c;
}

/* ---------- Results Table ---------- */

.table-wrapper {
    overflow-x: auto;
    margin-top: 1rem;
}

.downtime-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--color-bg);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.downtime-table thead {
    background: var(--color-primary);
    color: var(--color-primary-contrast);
}

.downtime-table th,
.downtime-table td {
    padding: 0.9rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--color-border);
}

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

.downtime-table tbody tr:hover {
    background: var(--color-surface);
}

.downtime-table td:not(:first-child),
.downtime-table th:not(:first-child) {
    text-align: right;
}

.downtime-table tbody td:not(:first-child) {
    color: #ef4444;
}

/* ---------- Intro Paragraph ---------- */

.section p {
    max-width: 75ch;
}

/* ---------- Disclaimer ---------- */

.card h2 {
    margin-top: 0;
}

/* ---------- Mobile Table ---------- */

@media (max-width: 640px) {

    .downtime-table th,
    .downtime-table td {
        padding: 0.75rem;
        font-size: var(--step--1);
    }

    .result-value {
        font-size: var(--step-1);
    }

}

/* ---------- Large Screens ---------- */

@media (min-width: 960px) {

    .result-value {
        font-size: var(--step-3);
    }

}

/* ---------- Optional Future CTA ---------- */

.calculator-cta {
    text-align: center;
    margin-top: 2rem;
}

.calculator-cta p {
    margin-bottom: 1rem;
}
