/* =====================================================================
   "Where Your Team's Day Goes": the savings calculator.
   A 9-to-5 bar fills with orange as the visitor sets the hours spent on
   repetitive work; the totals show the share of every day, working days
   a year and the yearly cost, from the visitor's own numbers (USD).
   ===================================================================== */

.workday {
    --wd-pain: #e8590c;
    --wd-pain-ink: #b8420a;
    --wd-pain-bg: #fff4e6;
    --wd-ok-bg: #eef1ff;
    --wd-line: #dfe3f0;
    display: grid;
    grid-template-columns: 1fr 1.25fr;
    gap: 22px;
    align-items: stretch;
    max-width: 1100px;
    margin: 40px auto 0;
    text-align: left;
}

.workday-inputs,
.workday-result {
    padding: 28px;
    border-radius: 18px;
    background: var(--white);
    box-shadow: 0 14px 40px rgba(27, 24, 70, 0.08);
}

/* ---------- inputs ---------- */
.workday-field + .workday-field {
    margin-top: 22px;
}

.workday-field label {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 8px;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-color);
}

.workday-field output {
    font-weight: 800;
    color: var(--primary-color);
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.workday-field input[type="number"] {
    width: 100%;
    height: 46px;
    padding: 0 14px;
    border: 1.5px solid var(--wd-line);
    border-radius: 10px;
    background: var(--white);
    font: inherit;
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-color);
}

.workday-field input[type="number"]:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.15);
}

.workday-field input[type="range"] {
    width: 100%;
    height: 28px;
    accent-color: var(--primary-color);
    cursor: pointer;
}

.workday-stepper {
    display: grid;
    grid-template-columns: 46px 1fr 46px;
    gap: 8px;
}

.workday-stepper input[type="number"] {
    text-align: center;
}

.workday-stepper button {
    border: 1.5px solid var(--wd-line);
    border-radius: 10px;
    background: var(--white);
    font: inherit;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary-color);
    cursor: pointer;
}

.workday-stepper button:focus-visible {
    outline: 3px solid var(--accent-color);
    outline-offset: 1px;
}

.workday-money {
    position: relative;
}

.workday-money span {
    position: absolute;
    top: 50%;
    left: 14px;
    transform: translateY(-50%);
    font-weight: 700;
    color: var(--text-light);
}

.workday-money input[type="number"] {
    padding-left: 30px;
}

/* ---------- the working day ---------- */
.workday-result {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.workday-result h3 {
    margin: 0 0 4px;
    font-size: 1.1rem;
    color: var(--text-color);
}

.workday-sub {
    margin: 0;
    font-size: 0.92rem;
    color: var(--text-light);
}

.workday-bar {
    display: flex;
    height: 58px;
    margin: 22px 0 6px;
    overflow: hidden;
    border-radius: 12px;
    background: var(--wd-ok-bg);
}

.workday-rep {
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-right: 2px solid var(--wd-pain);
    background: repeating-linear-gradient(135deg, #ffe3c2 0 8px, #ffd8a8 8px 16px);
    font-size: 0.9rem;
    font-weight: 800;
    color: var(--wd-pain-ink);
    white-space: nowrap;
    transition: width 0.35s ease;
}

.workday-rest {
    display: flex;
    flex: 1;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    font-size: 0.9rem;
    font-weight: 800;
    color: var(--primary-color);
    white-space: nowrap;
}

.workday-axis {
    display: flex;
    justify-content: space-between;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-light);
}

.workday-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 14px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-color);
}

.workday-legend span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.workday-legend i {
    width: 12px;
    height: 12px;
    border-radius: 3px;
}

.workday-legend .rep {
    border: 1.5px solid var(--wd-pain);
    background: #ffd8a8;
}

.workday-legend .rest {
    border: 1.5px solid var(--primary-color);
    background: var(--wd-ok-bg);
}

.workday-totals {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-top: 20px;
}

.workday-totals > div {
    padding: 14px;
    border-radius: 14px;
    background: #f7f8ff;
}

.workday-totals small {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-light);
}

.workday-totals b {
    display: block;
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--text-color);
    font-variant-numeric: tabular-nums;
}

.workday-totals .workday-hot {
    background: var(--wd-pain-bg);
}

.workday-totals .workday-hot b {
    color: var(--wd-pain-ink);
}

.workday-note {
    margin: 18px 0 0;
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-light);
}

@media (max-width: 991px) {
    .workday {
        grid-template-columns: 1fr;
        gap: 14px;
    }
}

@media (max-width: 767px) {
    .workday {
        margin-top: 30px;
    }

    .workday-inputs,
    .workday-result {
        padding: 20px;
    }

    .workday-bar {
        height: 50px;
    }

    .workday-totals {
        grid-template-columns: 1fr 1fr;
    }

    .workday-totals > div:last-child {
        grid-column: 1 / -1;
    }
}

@media (prefers-reduced-motion: reduce) {
    .workday-rep {
        transition: none;
    }
}
