/* Domestic Help Festival Bonus Calculator - Premium Styles */
/* Matched pair with domestic-help-salary-calculator.css — the two tools in this
   cluster deliberately share the same visual language, so this stylesheet keeps
   the same tokens, glass treatment, slider styling and light-theme overrides. */
body {
    background-color: #030303;
}

.apple-glass {
    background: rgba(18, 18, 20, 0.6);
    backdrop-filter: saturate(180%) blur(24px);
    -webkit-backdrop-filter: saturate(180%) blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.apple-card {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.03) 0%, rgba(255, 255, 255, 0.01) 100%);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.apple-card:hover {
    border-color: rgba(255, 255, 255, 0.12);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.01) 100%);
}

.text-glow-emerald {
    text-shadow: 0 0 30px rgba(16, 185, 129, 0.25);
}

.bg-subtle-grid-emerald {
    background-size: 60px 60px;
    background-image:
        linear-gradient(to right, rgba(16, 185, 129, 0.01) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(16, 185, 129, 0.01) 1px, transparent 1px);
}

/* Customized Range Sliders matching Apple aesthetics */
input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 5px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 9999px;
    outline: none;
    cursor: pointer;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #ffffff;
    cursor: pointer;
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.5);
    transition: transform 0.1s;
}

input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.25);
}

input[type="range"]::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border: 0;
    border-radius: 50%;
    background: #ffffff;
    cursor: pointer;
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.5);
    transition: transform 0.1s;
}

input[type="range"]::-moz-range-thumb:hover {
    transform: scale(1.25);
}

/* Custom interactive input styling */
.custom-input {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: all 0.2s ease-in-out;
}

.custom-input:focus {
    border-color: #10b981;
    outline: none;
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.15);
}

/* Native select control matched to the custom-input treatment.
   Kept at 44px min height so the touch target passes the mobile
   guideline used across the rest of the tool suite. */
.custom-select {
    background-color: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #fafafa;
    min-height: 44px;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3E%3Cpath stroke='%2371717a' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.6' d='M6 8l4 4 4-4'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1.15rem;
    padding-right: 2.25rem;
    transition: all 0.2s ease-in-out;
}

.custom-select:focus {
    border-color: #10b981;
    outline: none;
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.15);
}

.custom-select optgroup,
.custom-select option {
    background-color: #131315;
    color: #fafafa;
}

/* Breakdown ladder rows */
.factor-row {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 0.5rem;
    align-items: baseline;
    padding: 0.55rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.factor-row:last-child {
    border-bottom: 0;
}

.factor-row.is-total {
    border-top: 1px solid rgba(16, 185, 129, 0.3);
    border-bottom: 0;
    margin-top: 0.35rem;
    padding-top: 0.75rem;
}

/* ── Light theme overrides ───────────────────────────────────────────── */
html:not(.dark) {
    background-color: #f5f5f7;
}

html:not(.dark) body {
    background-color: #f5f5f7;
}

html:not(.dark) .apple-glass {
    background: rgba(255, 255, 255, 0.65);
    border-color: rgba(0, 0, 0, 0.08);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.03);
}

html:not(.dark) .apple-card {
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.01) 0%, rgba(0, 0, 0, 0.02) 100%);
    border-color: rgba(0, 0, 0, 0.05);
}

html:not(.dark) .apple-card:hover {
    border-color: rgba(0, 0, 0, 0.1);
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.02) 0%, rgba(0, 0, 0, 0.03) 100%);
}

html:not(.dark) input[type="range"] {
    background: rgba(0, 0, 0, 0.1);
}

html:not(.dark) input[type="range"]::-webkit-slider-thumb {
    background: #10b981;
    box-shadow: 0 0 6px rgba(0, 0, 0, 0.2);
}

html:not(.dark) input[type="range"]::-moz-range-thumb {
    background: #10b981;
    box-shadow: 0 0 6px rgba(0, 0, 0, 0.2);
}

html:not(.dark) .custom-input {
    background: rgba(255, 255, 255, 0.8);
    border-color: rgba(0, 0, 0, 0.12);
}

html:not(.dark) .custom-input:focus {
    border-color: #10b981;
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.1);
}

html:not(.dark) .custom-select {
    background-color: rgba(255, 255, 255, 0.85);
    border-color: rgba(0, 0, 0, 0.12);
    color: #18181b;
}

html:not(.dark) .custom-select:focus {
    border-color: #10b981;
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.1);
}

html:not(.dark) .custom-select optgroup,
html:not(.dark) .custom-select option {
    background-color: #ffffff;
    color: #18181b;
}

html:not(.dark) .factor-row {
    border-bottom-color: rgba(0, 0, 0, 0.07);
}

html:not(.dark) .bg-subtle-grid-emerald {
    background-image:
        linear-gradient(to right, rgba(0, 0, 0, 0.01) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(0, 0, 0, 0.01) 1px, transparent 1px);
}

/* Narrow phones (≈375px): let the factor ladder wrap to two lines
   instead of squeezing three columns into the width. */
@media (max-width: 400px) {
    .factor-row {
        grid-template-columns: 1fr auto;
    }

    .factor-row .factor-effect {
        grid-column: 1 / -1;
        text-align: left;
    }
}
