/* =========================================================
   CALCHUB AGE CALCULATOR
   Professional Responsive Design
   ========================================================= */

.calchub-age-wrapper {
    width: 100%;
    max-width: 760px;
    margin: 40px auto;
    padding: 0 15px;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
        Helvetica, Arial, sans-serif;
}

.calchub-age-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 15px 45px rgba(15, 23, 42, 0.10);
}


/* =========================================================
   HEADER
   ========================================================= */

.calchub-age-header {
    text-align: center;
    padding: 34px 25px 30px;
    background: linear-gradient(135deg, #f8fbff 0%, #ffffff 100%);
    border-bottom: 1px solid #edf0f4;
}

.calchub-age-icon {
    font-size: 40px;
    line-height: 1;
    margin-bottom: 12px;
}

.calchub-age-header h2 {
    margin: 0;
    padding: 0;
    color: #172033;
    font-size: 27px;
    font-weight: 800;
    letter-spacing: 0.5px;
}

.calchub-age-header p {
    margin: 8px 0 0;
    color: #64748b;
    font-size: 15px;
}


/* =========================================================
   BODY
   ========================================================= */

.calchub-age-body {
    padding: 32px;
}

.calchub-field {
    margin-bottom: 24px;
}

.calchub-field label {
    display: block;
    margin-bottom: 9px;
    color: #172033;
    font-size: 15px;
    font-weight: 700;
}


/* =========================================================
   DATE INPUT
   ========================================================= */

.calchub-date-box {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    box-sizing: border-box;
}

.calchub-date-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
    pointer-events: none;
    z-index: 2;
}

.calchub-date-box input {
    width: 100%;
    height: 54px;
    box-sizing: border-box;
    border: 1px solid #d8dee8;
    border-radius: 12px;
    background: #ffffff;
    color: #172033;
    font-size: 15px;
    padding: 0 15px 0 48px;
    outline: none;
    transition: all 0.2s ease;
}

.calchub-date-box input:hover {
    border-color: #b9c4d4;
}

.calchub-date-box input:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.10);
}


/* =========================================================
   AGE ON TOGGLE
   ========================================================= */

.calchub-age-on-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 16px 0;
    margin-bottom: 20px;
    border-top: 1px solid #eef1f5;
    border-bottom: 1px solid #eef1f5;
}

.calchub-age-on-row strong {
    display: block;
    color: #172033;
    font-size: 15px;
}

.calchub-age-on-row small {
    display: block;
    margin-top: 4px;
    color: #64748b;
    font-size: 12px;
}


/* Switch */

.calchub-switch {
    position: relative;
    display: inline-block;
    width: 52px;
    height: 28px;
    flex-shrink: 0;
}

.calchub-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.calchub-slider {
    position: absolute;
    inset: 0;
    cursor: pointer;
    background: #cbd5e1;
    border-radius: 30px;
    transition: 0.25s ease;
}

.calchub-slider:before {
    content: "";
    position: absolute;
    width: 22px;
    height: 22px;
    left: 3px;
    top: 3px;
    background: #ffffff;
    border-radius: 50%;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
    transition: 0.25s ease;
}

.calchub-switch input:checked + .calchub-slider {
    background: #2563eb;
}

.calchub-switch input:checked + .calchub-slider:before {
    transform: translateX(24px);
}


/* =========================================================
   CALCULATE BUTTON
   ========================================================= */

.calchub-calculate-btn {
    width: 100%;
    min-height: 54px;
    border: 0;
    border-radius: 12px;
    background: #2563eb;
    color: #ffffff;
    font-size: 15px;
    font-weight: 800;
    letter-spacing: 0.2px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 7px 18px rgba(37, 99, 235, 0.20);
}

.calchub-calculate-btn:hover {
    background: #1d4ed8;
    transform: translateY(-1px);
    box-shadow: 0 10px 24px rgba(37, 99, 235, 0.25);
}

.calchub-calculate-btn:active {
    transform: translateY(0);
}


/* =========================================================
   ERROR
   ========================================================= */

.calchub-age-error {
    margin-top: 15px;
    padding: 12px 14px;
    border-radius: 10px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #b91c1c;
    font-size: 14px;
    line-height: 1.5;
}


/* =========================================================
   RESULTS
   ========================================================= */

.calchub-age-results {
    border-top: 1px solid #e5e7eb;
}


/* =========================================================
   EXACT AGE
   ========================================================= */

.calchub-exact-age-section {
    padding: 30px 32px;
    background: #fbfdff;
}

.calchub-result-title {
    color: #2563eb;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.7px;
    margin-bottom: 24px;
}

.calchub-result-title span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    margin-right: 7px;
    border-radius: 50%;
    background: #dcfce7;
    color: #16a34a;
    font-size: 13px;
}


.calchub-exact-age-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    text-align: center;
}

.calchub-age-number-box {
    padding: 5px 10px;
}

.calchub-age-number-box strong {
    display: block;
    color: #172033;
    font-size: 42px;
    line-height: 1.05;
    font-weight: 800;
}

.calchub-age-number-box span {
    display: block;
    margin-top: 8px;
    color: #64748b;
    font-size: 13px;
    font-weight: 600;
}


/* =========================================================
   BREAKDOWN
   ========================================================= */

.calchub-breakdown-section {
    padding: 30px 32px;
    background: #ffffff;
    border-top: 1px solid #eef1f5;
}

.calchub-breakdown-title {
    margin-bottom: 24px;
    text-align: center;
    color: #172033;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.8px;
}

.calchub-breakdown-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
}

.calchub-breakdown-item {
    padding: 18px;
    text-align: center;
    background: #f8fafc;
    border: 1px solid #e8edf3;
    border-radius: 12px;
}

.calchub-breakdown-item span {
    display: block;
    margin-bottom: 7px;
    color: #64748b;
    font-size: 13px;
}

.calchub-breakdown-item strong {
    display: block;
    color: #172033;
    font-size: 22px;
    font-weight: 800;
    word-break: break-word;
}

.calchub-full-width {
    grid-column: 1 / -1;
}


/* =========================================================
   NEXT BIRTHDAY
   ========================================================= */

.calchub-next-birthday {
    margin: 0 32px 30px;
    padding: 24px;
    text-align: center;
    border: 1px solid #bfdbfe;
    border-radius: 16px;
    background: #eff6ff;
}

.calchub-birthday-title {
    color: #2563eb;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.6px;
    margin-bottom: 13px;
}

.calchub-birthday-countdown {
    color: #172033;
    font-size: 21px;
    font-weight: 800;
}

.calchub-birthday-date {
    margin-top: 6px;
    color: #64748b;
    font-size: 14px;
    font-weight: 600;
}


/* =========================================================
   FOOTER
   ========================================================= */

.calchub-age-footer {
    padding: 18px 25px;
    text-align: center;
    border-top: 1px solid #eef1f5;
    background: #fafbfc;
    color: #64748b;
    font-size: 12px;
    line-height: 1.5;
}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 600px) {

    .calchub-age-wrapper {
        margin: 25px auto;
        padding: 0 10px;
    }

    .calchub-age-card {
        border-radius: 18px;
    }

    .calchub-age-header {
        padding: 28px 18px 24px;
    }

    .calchub-age-header h2 {
        font-size: 23px;
    }

    .calchub-age-header p {
        font-size: 14px;
    }

    .calchub-age-body {
        padding: 24px 18px;
    }

    .calchub-exact-age-section {
        padding: 25px 18px;
    }

    .calchub-breakdown-section {
        padding: 25px 18px;
    }

    .calchub-next-birthday {
        margin: 0 18px 25px;
    }

    .calchub-age-number-box strong {
        font-size: 34px;
    }

    .calchub-age-number-box span {
        font-size: 12px;
    }

    .calchub-breakdown-grid {
        grid-template-columns: 1fr;
    }

    .calchub-full-width {
        grid-column: auto;
    }

    .calchub-age-on-row {
        gap: 10px;
    }

    .calchub-age-on-row small {
        max-width: 220px;
    }
}


/* =========================================================
   VERY SMALL MOBILE
   ========================================================= */

@media (max-width: 380px) {

    .calchub-exact-age-grid {
        gap: 5px;
    }

    .calchub-age-number-box strong {
        font-size: 29px;
    }

    .calchub-age-number-box span {
        font-size: 11px;
    }

    .calchub-age-on-row small {
        font-size: 11px;
    }

}