@import url('https://fonts.googleapis.com/css2?family=Sora:wght@400;500;600;700;800&display=swap');

/* ============================================================
   WAICAH Time Savings Calculator — v2.0.7
   Gradient : #D684FA → #FDB282 (purple → peach)
   Results  : #3b82f6 → #93c5fd (blue)
   Radius   : 50px everywhere
   Text     : #002652
   ============================================================ */

.waicah-calc {
    max-width: 760px;
    margin: 2.5rem auto;
    padding: 0 1rem;
    font-family: 'Sora', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
                 'Helvetica Neue', Arial, sans-serif;
    font-size: 18px;
    color: #002652;
    -webkit-font-smoothing: antialiased;
    box-sizing: border-box;
}

.waicah-calc *,
.waicah-calc *::before,
.waicah-calc *::after { box-sizing: inherit; }

/* ── Header ── */
.waicah-calc__header {
    text-align: center;
    margin-bottom: 1.75rem;
    padding: 3rem 2rem 2.75rem;
    background: linear-gradient(135deg, #002652 0%, #fc9b91 100%);
    border-radius: 50px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 6px 28px rgba(0,38,82,.38);
}

.waicah-calc__header::before {
    content: '';
    position: absolute;
    top: -55px; right: -55px;
    width: 170px; height: 170px;
    background: rgba(255,255,255,.22);
    border-radius: 50%;
    pointer-events: none;
}
.waicah-calc__header::after {
    content: '';
    position: absolute;
    bottom: -38px; left: -38px;
    width: 120px; height: 120px;
    background: rgba(255,255,255,.16);
    border-radius: 50%;
    pointer-events: none;
}

.waicah-calc__header-icon {
    display: flex;
    justify-content: center;
    margin-bottom: 1rem;
    position: relative;
    z-index: 1;
}

.waicah-calc__title {
    font-size: clamp(2.25rem, 6vw, 3.25rem);
    font-weight: 800;
    margin: 0 0 .75rem;
    color: #ffffff;
    line-height: 1.2;
    position: relative;
    z-index: 1;
}

.waicah-calc__subtitle {
    color: rgba(255,255,255,.88);
    font-size: 1.375rem;
    margin: 0;
    position: relative;
    z-index: 1;
}

/* ── Form card ── */
.waicah-calc__form {
    background: #ffffff;
    border: 1.5px solid #f0d4fa;
    border-radius: 50px;
    padding: 2.5rem 2.75rem;
    box-shadow: 0 8px 32px rgba(214,132,250,.15);
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* ── Field / legend ── */
.waicah-calc__field { border: 0; padding: 0; margin: 0; min-width: 0; }

.waicah-calc__label {
    display: block;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #002652;
    margin-bottom: .65rem;
}

/* ── Mode buttons ── */
.waicah-calc__modes { display: flex; gap: .75rem; }

.waicah-calc__mode-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .4rem;
    padding: 1.125rem .75rem;
    background: #ffffff;
    border: 2px solid #f0d4fa;
    border-radius: 50px;
    color: #002652;
    font-size: 1.125rem;
    font-weight: 600;
    font-family: 'Sora', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
                 'Helvetica Neue', Arial, sans-serif;
    cursor: pointer;
    transition: border-color .18s, background .18s, color .18s,
                box-shadow .18s, transform .15s;
    line-height: 1.3;
}

.waicah-calc__mode-btn:not(.waicah-calc__mode-btn--active):hover {
    border-color: #D684FA;
    color: #002652;
    background: #fdf5ff;
    transform: translateY(-1px);
}

.waicah-calc__mode-btn:focus-visible {
    outline: 3px solid #D684FA;
    outline-offset: 2px;
}

.waicah-calc__mode-btn--active {
    background: linear-gradient(135deg, #D684FA 0%, #FDB282 100%);
    border-color: transparent;
    color: #ffffff;
    box-shadow: 0 4px 16px rgba(214,132,250,.45);
    text-shadow: 0 1px 2px rgba(0,0,0,.12);
}

.waicah-calc__mode-btn--active:hover {
    opacity: .92;
    transform: translateY(-1px);
}

/* ── Two-column row ── */
.waicah-calc__row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
}

/* ── Shared inputs ── */
.waicah-calc__input {
    display: block;
    width: 100%;
    padding: .875rem 1.5rem;
    border: 2px solid #f0d4fa;
    border-radius: 50px;
    font-size: 1.1875rem;
    color: #002652;
    background: #ffffff;
    font-family: 'Sora', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
                 'Helvetica Neue', Arial, sans-serif;
    transition: border-color .18s, box-shadow .18s;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

.waicah-calc__input:focus {
    border-color: #D684FA;
    box-shadow: 0 0 0 3px rgba(214,132,250,.18);
}

.waicah-calc__consult {
    display: flex;
    align-items: center;
    gap: .875rem;
    flex: 1;
}

/* Inline label + inputs on one row */
.waicah-calc__field--inline {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.waicah-calc__field--inline > .waicah-calc__label {
    margin-bottom: 0;
    white-space: nowrap;
    flex-shrink: 0;
}

.waicah-calc__input--count {
    flex: 0 0 90px;
    text-align: center;
}

.waicah-calc__period-text {
    font-size: 1.1875rem;
    font-weight: 600;
    color: #002652;
    white-space: nowrap;
}

/* ── Error message ── */
.waicah-calc__error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
    border-radius: 50px;
    padding: .875rem 1.5rem;
    font-size: 1rem;
    font-weight: 500;
}

/* ── Submit button ── */
.waicah-calc__submit {
    width: 100%;
    padding: 1.25rem 1.75rem;
    background: linear-gradient(135deg, #D684FA 0%, #FDB282 100%);
    color: #ffffff;
    border: none;
    border-radius: 50px;
    font-size: 1.375rem;
    font-weight: 700;
    font-family: 'Sora', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
                 'Helvetica Neue', Arial, sans-serif;
    cursor: pointer;
    letter-spacing: .03em;
    transition: opacity .18s, transform .15s, box-shadow .18s;
    box-shadow: 0 4px 18px rgba(214,132,250,.45);
    text-shadow: 0 1px 3px rgba(0,0,0,.15);
    position: relative;
    overflow: hidden;
}

.waicah-calc__submit::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,.22) 0%, transparent 55%);
    pointer-events: none;
}

.waicah-calc__submit:hover {
    opacity: .91;
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(214,132,250,.55);
}

.waicah-calc__submit:active  { transform: translateY(0); opacity: 1; }

.waicah-calc__submit:focus-visible {
    outline: 3px solid #D684FA;
    outline-offset: 3px;
}

/* ── Results section ── */
.waicah-calc__results { margin-top: 2rem; }

.waicah-calc__results-header {
    text-align: center;
    margin-bottom: 1.75rem;
}

.waicah-calc__results-title {
    font-size: 2.125rem;
    font-weight: 800;
    margin: 0 0 .5rem;
    color: #002652;
    line-height: 1.3;
}


/* ── Cards grid ── */
.waicah-calc__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.125rem;
}

.waicah-calc__card {
    background: #ffffff;
    border: 1.5px solid #f0d4fa;
    border-radius: 50px;
    padding: 1.625rem 1.125rem;
    text-align: center;
    box-shadow: 0 2px 10px rgba(214,132,250,.10);
    opacity: 0;
    transform: translateY(12px);
    transition: transform .2s, box-shadow .2s;
    position: relative;
    overflow: hidden;
}

/* gradient accent bar at card top */
.waicah-calc__card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: linear-gradient(90deg, #D684FA, #FDB282);
}

.waicah-calc__card.is-visible { animation: wc-fade-up .42s ease forwards; }

.waicah-calc__card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 32px rgba(214,132,250,.20);
}

/* Featured Par an card */
.waicah-calc__card--featured {
    grid-column: 1 / -1;
    background: linear-gradient(135deg, #D684FA 0%, #E49CDB 100%);
    border-color: transparent;
    padding: 2.25rem 1.25rem;
    box-shadow: 0 6px 24px rgba(228,156,219,.35);
}

.waicah-calc__card--featured::before { display: none; }

.waicah-calc__card--featured:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 36px rgba(228,156,219,.55);
}

/* Card labels */
.waicah-calc__card-label {
    font-size: .9375rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: #002652;
    margin-bottom: .6rem;
}

.waicah-calc__card--featured .waicah-calc__card-label {
    color: rgba(255,255,255,.85);
    font-size: 1.0625rem;
}

/* Card values */
.waicah-calc__card-value {
    font-size: 2.125rem;
    font-weight: 800;
    line-height: 1.1;
    color: #002652;
}

.waicah-calc__card--featured .waicah-calc__card-value {
    color: #ffffff;
    font-size: 3.5rem;
}

/* ── Animations ── */

/* Cards stagger (existing) */
@keyframes wc-fade-up {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Header / form entrance */
@keyframes wc-slide-down {
    from { opacity: 0; transform: translateY(-28px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes wc-slide-up {
    from { opacity: 0; transform: translateY(28px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Clock icon float */
@keyframes wc-float {
    0%, 100% { transform: translateY(0); }
    50%       { transform: translateY(-8px); }
}

/* Submit button shine sweep */
@keyframes wc-shine {
    from { left: -80%; }
    to   { left: 130%; }
}

/* Apply entrance animations */
.waicah-calc__header { animation: wc-slide-down .52s cubic-bezier(.22,.68,0,1.15) both; }
.waicah-calc__form   { animation: wc-slide-up   .52s .18s cubic-bezier(.22,.68,0,1.15) both; }

/* Floating clock icon */
.waicah-calc__header-icon { animation: wc-float 3.2s ease-in-out infinite; }

/* Submit shine on hover */
.waicah-calc__submit::before {
    content: '';
    position: absolute;
    top: 0; left: -80%;
    width: 50%; height: 100%;
    background: linear-gradient(120deg, transparent, rgba(255,255,255,.32), transparent);
    transform: skewX(-15deg);
    pointer-events: none;
}
.waicah-calc__submit:hover::before { animation: wc-shine .55s ease forwards; }

/* Mode button press */
.waicah-calc__mode-btn:active { transform: scale(0.96); }

/* ── Responsive ── */
@media (max-width: 640px) {
    .waicah-calc__form  { padding: 1.75rem 1.5rem; border-radius: 30px; }
    .waicah-calc__row   { grid-template-columns: 1fr; }
    .waicah-calc__modes { flex-direction: column; }
    .waicah-calc__grid  { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 380px) {
    .waicah-calc__grid { grid-template-columns: 1fr; }
}
