/* =============================================================================
   Germany Salary Calculator — Styles
   Colors: net #16A34A | tax #DC2626 | social var(--primary-color,#0F766E) | church #7C3AED
   ============================================================================= */

/* ── Wrapper: two-column on desktop, stacked on mobile ─────────────────────── */
.sc-wrap {
    display: flex;
    gap: 2rem;
    max-width: 1120px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, sans-serif;
    font-size: 15px;
    color: #1a1a1a;
    line-height: 1.5;
}

/* ── Input panel ────────────────────────────────────────────────────────────── */
.sc-inputs {
    flex: 0 0 370px;
    position: sticky;
    top: 80px;          /* adjust to your site's header height */
    align-self: flex-start;
    background: #edf6ee;
    /* border: 1px solid var(--primary-color,#0F766E); */
    border-radius: 12px;
    padding: 1.5rem;
}

.sc-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: #111827;
    margin: 0 0 1.25rem;
}

.sc-badge {
    background: #dbeafe;
    color: #1d4ed8;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 4px;
    vertical-align: middle;
    margin-left: 5px;
    letter-spacing: 0.03em;
}

/* ── Individual form fields ─────────────────────────────────────────────────── */
.sc-field {
    margin-bottom: 1rem;
}

.sc-field label,
.sc-field > label {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.3rem;
}

.sc-field input[type="number"],
.sc-field select {
    width: 100%;
    padding: 0.45rem 0.7rem;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 0.93rem;
    color: #111827;
    background: #fff;
    box-sizing: border-box;
    transition: border-color 0.15s, box-shadow 0.15s;
    -moz-appearance: textfield; /* hide number spinners in Firefox */
}

.sc-field input[type="number"]::-webkit-inner-spin-button,
.sc-field input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
}

.sc-field input[type="number"]:focus,
.sc-field select:focus {
    outline: none;
    border-color: var(--primary-color,#0F766E);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

/* Row with prefix (€) or suffix (%) */
.sc-row {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}
.sc-row input {
    flex: 1;
    min-width: 0;
}
.sc-pre,
.sc-suf {
    font-size: 0.95rem;
    color: #6b7280;
    font-weight: 500;
    flex-shrink: 0;
}

/* ── Toggle button groups ───────────────────────────────────────────────────── */
.sc-toggles {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.3rem;
}

.sc-btn {
    padding: 0.4rem 0.9rem;
    min-height: 40px;       /* accessibility: 44 px touch target with border */
    min-width:  44px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: #fff;
    color: #374151;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.15s;
    line-height: 1.2;
}

.sc-btn:hover {
    border-color: var(--primary-color,#0F766E);
    color: #fff;
}

.sc-btn.active {
    background: var(--primary-color,#0F766E);
    border-color: var(--primary-color,#0F766E);
    color: #fff;
    font-weight: 600;
}

/* Sub-field (indented, shown when toggle is "yes") */
.sc-sub {
    margin-top: 0.5rem;
    padding-left: 0.75rem;
    border-left: 3px solid #e5e7eb;
}
.sc-sub label {
    font-size: 0.8rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.25rem;
}

/* Info icon */
.sc-i {
    display: inline-block;
    cursor: pointer;
    color: #9ca3af;
    font-size: 0.78rem;
    font-style: normal;
    margin-left: 3px;
    vertical-align: middle;
    user-select: none;
}
.sc-i:hover { color: var(--primary-color,#0F766E); }

/* Hint (minijob warning) */
.sc-hint {
    margin: 0.35rem 0 0;
    padding: 0.4rem 0.6rem;
    font-size: 0.78rem;
    color: #92400e;
    background: #fffbeb;
    border-left: 3px solid #f59e0b;
    border-radius: 4px;
}

/* Midijob Übergangsbereich notice (results panel) */
.sc-midijob-note {
    margin: 0 0 1.25rem;
    padding: 0.5rem 0.75rem;
    font-size: 0.8rem;
    color: #1e40af;
    background: #eff6ff;
    border-left: 3px solid #3b82f6;
    border-radius: 4px;
    line-height: 1.55;
}

/* GDPR note */
.sc-gdpr {
    font-size: 0.72rem;
    color: #374151;
    text-align: center;
    margin: 1rem 0 0;
}

/* ── Results panel ──────────────────────────────────────────────────────────── */
.sc-results {
    flex: 1;
    min-width: 0;
}

/* Hero card */
.sc-hero {
    background: linear-gradient( 135deg, #16a34a 0%, #15803d 100% );
    color: #fff;
    border-radius: 12px;
    padding: 1.75rem 2rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

.sc-hero-label {
    font-size: 0.82rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    opacity: 0.85;
    margin-bottom: 0.2rem;
}

.sc-hero-amount {
    font-size: 2.8rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin: 0.1rem 0;
}

.sc-hero-annual {
    font-size: 0.95rem;
    opacity: 0.9;
    margin: 0.2rem 0;
}

.sc-hero-rate {
    font-size: 0.82rem;
    opacity: 0.8;
    margin: 0.15rem 0;
}

.sc-hero-year {
    font-size: 0.72rem;
    opacity: 0.6;
    margin-top: 0.4rem;
    letter-spacing: 0.02em;
}

/* Chart */
.sc-chart-wrap {
    max-width: 320px;
    margin: 0 auto 1.5rem;
}

.sc-chart-wrap canvas {
    width: 100% !important;
    height: auto !important;
}

/* ── Breakdown table ────────────────────────────────────────────────────────── */
.sc-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
    margin-bottom: 1.25rem;
}

.sc-table th {
    background: var(--primary-color,#0F766E);
    padding: 0.55rem 0.75rem;
    text-align: left;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #fff;
}

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

.sc-table td {
    padding: 0.55rem 0.75rem;
    border-bottom: 1px solid #f3f4f6;
    color: #374151;
    vertical-align: top;
}

.sc-table td:not(:first-child) {
    text-align: right;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.sc-table tr:hover td { background: #f9fafb; }

/* German term in deduction labels */
.sc-de {
    display: block;
    font-size: 0.72rem;
    color: #9ca3af;
    font-style: italic;
    margin-top: 1px;
}

/* Gross row */
.sc-row-gross td {
    background: #eff6ff;
    color: #1d4ed8;
    font-weight: 600;
}

/* Net row */
.sc-row-net td {
    background: #f0fdf4;
    color: #16a34a;
    font-weight: 700;
    border-top: 2px solid #16a34a;
}

/* % column (hide on small screens via responsive rules below) */
.sc-td-pct { color: #6b7280; }

/* ── Employer section ───────────────────────────────────────────────────────── */
.sc-employer {
    margin-bottom: 1.25rem;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
}

.sc-employer summary {
    padding: 0.7rem 1rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: #374151;
    background: #f9fafb;
    cursor: pointer;
    user-select: none;
    list-style: none;
}

.sc-employer summary::-webkit-details-marker { display: none; }
.sc-employer summary:hover { background: #f3f4f6; }

.sc-employer .sc-table {
    margin: 0;
}

.sc-emp-note {
    font-size: 0.78rem;
    color: #6b7280;
    padding: 0.5rem 0.75rem 0.75rem;
    margin: 0;
    background: #fff;
}

/* ── Disclaimer & footer ────────────────────────────────────────────────────── */
.sc-disclaimer {
    font-size: 0.75rem;
    color: #6b7280;
    line-height: 1.55;
    padding: 0.75rem;
    background: #f9fafb;
    border-radius: 6px;
    margin-bottom: 0.4rem;
}

.sc-verified {
    font-size: 0.7rem;
    color: #d1d5db;
    text-align: right;
    margin: 0;
}

/* ── Tooltip ────────────────────────────────────────────────────────────────── */
.sc-tooltip {
    display: none;
    position: absolute;
    z-index: 99999;
    background: #1f2937;
    color: #f9fafb;
    font-size: 0.78rem;
    line-height: 1.55;
    padding: 0.6rem 0.9rem;
    border-radius: 8px;
    max-width: 280px;
    box-shadow: 0 4px 16px rgba( 0, 0, 0, 0.25 );
    pointer-events: none;
}

/* ── Responsive ─────────────────────────────────────────────────────────────── */

/* Tablet: narrow the input panel */
@media ( max-width: 900px ) {
    .sc-inputs {
        flex: 0 0 300px;
    }
}

/* Mobile: stack everything vertically */
@media ( max-width: 700px ) {
    .sc-wrap {
        flex-direction: column;
        gap: 1rem;
    }

    .sc-inputs {
        flex: none;
        position: static;   /* no sticky on mobile */
        width: 100%;
    }

    .sc-hero-amount {
        font-size: 2.2rem;
    }

    /* Hide Annual column — too cramped */
    .sc-th-annual,
    .sc-table .sc-th-annual {
        display: none;
    }
}

/* Small mobile: also hide % column */
@media ( max-width: 480px ) {
    .sc-th-pct,
    .sc-td-pct,
    .sc-table th:last-child,
    .sc-table td:last-child {
        display: none;
    }

    .sc-hero {
        padding: 1.25rem 1rem;
    }
}
