/*
 * Calculator Sarcină
 * Styling bazat pe maternitateagiulesti.ro/programare/
 */

/* ── Fonturi (aceleași ca pe site) ─────────────────────── */
@font-face {
    font-family: 'GT Super Display';
    src: url('https://maternitateagiulesti.ro/wp-content/themes/maternitatea-giulesti/assets/fonts/GT-Super-Display-Medium__GT-Super-Display-Medium.woff2') format('woff2'),
         url('https://maternitateagiulesti.ro/wp-content/themes/maternitatea-giulesti/assets/fonts/GT-Super-Display-Medium__GT-Super-Display-Medium.woff') format('woff');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Switzer';
    src: url('https://maternitateagiulesti.ro/wp-content/themes/maternitatea-giulesti/assets/fonts/Switzer-Light__Switzer-Light.woff2') format('woff2');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Switzer';
    src: url('https://maternitateagiulesti.ro/wp-content/themes/maternitatea-giulesti/assets/fonts/Switzer-Regular__Switzer-Regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Switzer';
    src: url('https://maternitateagiulesti.ro/wp-content/themes/maternitatea-giulesti/assets/fonts/Switzer-Medium__Switzer-Medium.woff2') format('woff2');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Switzer';
    src: url('https://maternitateagiulesti.ro/wp-content/themes/maternitatea-giulesti/assets/fonts/Switzer-Bold__Switzer-Bold.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

/* ── Flatpickr custom theme ────────────────────────────── */
.flatpickr-calendar {
    font-family: Switzer, system-ui, sans-serif;
    border: 1px solid #EDE4D5;
    border-radius: 8px;
    box-shadow: 0 12px 32px rgba(10, 45, 105, 0.14);
    padding: 0;
    overflow: hidden;
    width: 308px;
    z-index: 9999 !important;
}

.flatpickr-calendar.arrowTop::before,
.flatpickr-calendar.arrowTop::after { border-bottom-color: #204d99; }

/* Header */
.flatpickr-months {
    background: #204d99;
    border-radius: 0;
    padding: 10px 0;
    align-items: center;
}

.flatpickr-months .flatpickr-month {
    background: transparent;
    color: #fff;
    fill: #fff;
    height: 36px;
}

.flatpickr-current-month {
    font-size: 15px;
    font-weight: 600;
    color: #fff;
    padding-top: 2px;
}

.flatpickr-current-month .flatpickr-monthDropdown-months {
    background: transparent;
    color: #fff;
    font-weight: 600;
    font-size: 15px;
    font-family: Switzer, system-ui, sans-serif;
    border: none;
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
}

.flatpickr-current-month input.cur-year {
    color: #fff;
    font-weight: 600;
    font-size: 15px;
    font-family: Switzer, system-ui, sans-serif;
}

.flatpickr-months .flatpickr-prev-month,
.flatpickr-months .flatpickr-next-month {
    color: #fff;
    fill: #fff;
    padding: 6px 10px;
    top: 50%;
    transform: translateY(-50%);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .15s;
}

.flatpickr-months .flatpickr-prev-month:hover,
.flatpickr-months .flatpickr-next-month:hover {
    color: #fc0 !important;
    fill: #fc0 !important;
    background: rgba(255,255,255,.15);
}

.flatpickr-months .flatpickr-prev-month:hover svg,
.flatpickr-months .flatpickr-next-month:hover svg {
    fill: #fc0 !important;
}

.flatpickr-months .flatpickr-prev-month svg,
.flatpickr-months .flatpickr-next-month svg {
    width: 16px;
    height: 16px;
}

.flatpickr-months {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.flatpickr-months .flatpickr-month {
    flex: 1;
    text-align: center;
}

.flatpickr-current-month {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    position: static;
    width: auto;
    left: auto;
    padding-top: 0;
}

/* Weekdays */
span.flatpickr-weekday {
    background: #f6f1e8;
    color: #8b877e;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
}

.flatpickr-weekdays { background: #f6f1e8; }
.flatpickr-days { border: none; }

.flatpickr-day {
    color: #204d99;
    font-size: 13px;
    font-weight: 400;
    border-radius: 6px;
    border: none;
}

.flatpickr-day:hover {
    background: #EDE4D5;
    border-color: transparent;
    color: #0a2d69;
}

.flatpickr-day.selected,
.flatpickr-day.selected:hover,
.flatpickr-day.startRange,
.flatpickr-day.endRange {
    background: #204d99;
    border-color: #204d99;
    color: #fff;
    font-weight: 600;
}

.flatpickr-day.today {
    border: 2px solid #fc0;
    color: #0a2d69;
    font-weight: 700;
}

.flatpickr-day.today:hover {
    background: #fc0;
    border-color: #fc0;
    color: #0a2d69;
}

.flatpickr-day.flatpickr-disabled,
.flatpickr-day.flatpickr-disabled:hover,
.flatpickr-day.nextMonthDay,
.flatpickr-day.prevMonthDay {
    color: #D7CBB7;
    background: transparent;
}

/* ── Reset scoped — neutralizează stilurile temei ──────── */
.cs_container *,
.cs_container *::before,
.cs_container *::after {
    box-sizing: border-box !important;
}

.cs_container input,
.cs_container input[type="text"],
.cs_container input[type="number"] {
    -webkit-appearance: none !important;
    appearance: none !important;
    border-radius: 4px !important;
    background: #fff !important;
    border: 1px solid #D7CBB7 !important;
    box-shadow: none !important;
    outline: none !important;
    margin: 0 !important;
    padding: 0 14px !important;
    height: 51px !important;
    width: 100% !important;
    font-family: Switzer, system-ui, sans-serif !important;
    font-size: 16px !important;
    color: #0a2d69 !important;
    line-height: normal !important;
}

/* Inputs din interiorul wrapper-elor nu au border propriu — borderul e pe wrapper */
.cs_container .cs_input_icon_wrap input,
.cs_container .cs_input_suffix_wrap input {
    border: none !important;
    border-radius: 0 !important;
    width: auto !important;
    flex: 1 !important;
}

.cs_container button {
    -webkit-appearance: none !important;
    appearance: none !important;
    border: none !important;
    outline: none !important;
    cursor: pointer !important;
    text-align: left !important;
    margin: 0 !important;
}

.cs_container label {
    display: block !important;
    font-weight: 500 !important;
    margin: 0 0 8px !important;
    padding: 0 !important;
    float: none !important;
    width: auto !important;
}

.cs_container p {
    margin: 0 !important;
    padding: 0 !important;
}

.cs_container a {
    text-decoration: none !important;
}

/* ── Container ─────────────────────────────────────────── */
.cs_container {
    max-width: 760px;
    margin: 0 auto;
    font-family: Switzer, system-ui, sans-serif;
    font-size: 22px;
    font-weight: 300;
    line-height: 1.5;
    color: #204d99;
}

/* ── Header ────────────────────────────────────────────── */
.cs_header {
    background-color: #f6f1e8;
    padding: 56px 40px 48px;
    margin-bottom: 0;
}

@media (max-width: 600px) {
    .cs_header { padding: 40px 24px 36px; }
}

.cs_header_eyebrow {
    font-family: Switzer, system-ui, sans-serif;
    font-size: 17px;
    font-weight: 400;
    color: #8b877e;
    margin-bottom: 12px;
}

.cs_title {
    font-family: 'GT Super Display', serif;
    font-size: 56px;
    font-weight: 500;
    line-height: 1.1;
    letter-spacing: -1.2px;
    color: #0a2d69;
    margin: 0 0 20px;
}

.cs_title em {
    font-style: italic;
}

.cs_subtitle {
    font-family: Switzer, system-ui, sans-serif;
    font-size: 18px;
    font-weight: 300;
    color: #204d99;
    margin: 0;
    max-width: 540px;
    line-height: 1.6;
}

@media (max-width: 768px) {
    .cs_title { font-size: 40px; }
}

@media (max-width: 480px) {
    .cs_title { font-size: 34px; letter-spacing: -.8px; }
}

/* ── Card ──────────────────────────────────────────────── */
.cs_card {
    background: #fff !important;
    border-radius: 4px !important;
    padding: 32px 40px !important;
    box-shadow: 0 12px 16px rgba(10, 45, 105, 0.08) !important;
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    float: none !important;
    box-sizing: border-box !important;
}

@media (max-width: 600px) {
    .cs_card { padding: 24px 20px !important; }
}

.cs_card_title {
    font-size: 13px !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: .08em !important;
    color: #8b877e !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    margin-bottom: 24px !important;
}

.cs_dot {
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #fc0;
    flex-shrink: 0;
}

/* ── Fields ────────────────────────────────────────────── */
.cs_fields {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 20px !important;
    margin-bottom: 28px !important;
}

@media (max-width: 600px) {
    .cs_fields { grid-template-columns: 1fr !important; }
}

.cs_field label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #204d99;
    margin-bottom: 8px;
    font-family: Switzer, system-ui, sans-serif;
}

.cs_field input {
    width: 100%;
    height: 51px;
    padding: 0 14px;
    border: 1px solid #D7CBB7;
    border-radius: 4px;
    background: #fff;
    font-family: Switzer, system-ui, sans-serif;
    font-size: 16px;
    color: #0a2d69;
    outline: none;
    transition: border-color .2s, box-shadow .2s;
}

.cs_field input:focus {
    border-color: #204d99;
    box-shadow: 0 0 0 3px rgba(32, 77, 153, 0.12);
}

/* ── Input with left icon (date) ───────────────────────── */
.cs_input_icon_wrap {
    display: flex !important;
    align-items: center !important;
    border: 1px solid #D7CBB7 !important;
    border-radius: 4px !important;
    background: #fff !important;
    overflow: hidden !important;
    transition: border-color .2s, box-shadow .2s;
    cursor: pointer !important;
}

.cs_input_icon_wrap:focus-within {
    border-color: #204d99;
    box-shadow: 0 0 0 3px rgba(32, 77, 153, 0.12);
}

.cs_input_icon {
    padding: 0 13px;
    height: 51px;
    display: flex;
    align-items: center;
    color: #8b877e;
    background: #f6f1e8;
    border-left: 1px solid #D7CBB7;
    flex-shrink: 0;
    transition: color .2s;
}

.cs_input_icon_wrap:hover .cs_input_icon {
    color: #204d99;
}

.cs_input_icon_wrap input[data-input] {
    border: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    flex: 1 !important;
    cursor: pointer !important;
    min-width: 0 !important;
    width: auto !important;
}

.cs_input_icon_wrap input[data-input]:focus {
    border: none !important;
    box-shadow: none !important;
}

.cs_input_icon_wrap input::-webkit-calendar-picker-indicator,
.cs_input_icon_wrap input::-webkit-inner-spin-button,
.cs_input_icon_wrap input::-webkit-clear-button {
    display: none;
    -webkit-appearance: none;
}

/* ── Input with right suffix (cycle) ───────────────────── */
.cs_input_suffix_wrap {
    display: flex !important;
    align-items: center !important;
    border: 1px solid #D7CBB7 !important;
    border-radius: 4px !important;
    background: #fff !important;
    overflow: hidden !important;
    transition: border-color .2s, box-shadow .2s;
}

.cs_input_suffix_wrap:focus-within {
    border-color: #204d99;
    box-shadow: 0 0 0 3px rgba(32, 77, 153, 0.12);
}

.cs_input_suffix_wrap input {
    border: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    flex: 1 !important;
    min-width: 0 !important;
    width: auto !important;
}

.cs_input_suffix_wrap input:focus {
    border: none !important;
    box-shadow: none !important;
}

.cs_input_suffix {
    padding: 0 14px;
    font-size: 14px;
    font-weight: 500;
    color: #8b877e;
    background: #f6f1e8;
    border-left: 1px solid #D7CBB7;
    height: 51px;
    display: flex;
    align-items: center;
    white-space: nowrap;
    flex-shrink: 0;
}

.cs_range_hint {
    display: block;
    font-size: 13px;
    color: #204d99;
    margin-top: 7px;
    font-family: Switzer, system-ui, sans-serif;
    line-height: 1.5;
    font-weight: 400;
    opacity: .75;
}

/* ── Button ────────────────────────────────────────────── */
.cs_btn,
a.cs_btn {
    display: inline-flex !important;
    align-items: center !important;
    gap: 10px !important;
    background: #fc0 !important;
    color: #204d99 !important;
    border: none !important;
    border-radius: 200px !important;
    padding: 12px 28px !important;
    font-family: Switzer, system-ui, sans-serif !important;
    font-size: 17px !important;
    font-weight: 600 !important;
    line-height: 1.5 !important;
    cursor: pointer !important;
    text-decoration: none !important;
    box-shadow: none !important;
    transition: background .2s, color .2s;
}

.cs_btn:hover,
a.cs_btn:hover {
    background: #fa0 !important;
    color: #0a2d69 !important;
    text-decoration: none !important;
    box-shadow: none !important;
    border: none !important;
    outline: none !important;
}

.cs_btn:focus,
a.cs_btn:focus {
    box-shadow: none !important;
    outline: none !important;
}

.cs_btn svg,
a.cs_btn svg {
    flex-shrink: 0 !important;
    display: block !important;
}

/* ── Result Hero ───────────────────────────────────────── */
.cs_result_hero {
    background: #204d99;
    padding: 36px 40px;
    text-align: center;
    color: #fff;
    margin-bottom: 0;
    box-shadow: 6px 6px 32px rgba(6, 24, 55, 0.15);
}

@media (max-width: 600px) {
    .cs_result_hero { padding: 28px 20px; }
}

.cs_ga_display {
    font-family: 'GT Super Display', serif;
    font-size: 52px;
    font-weight: 500;
    line-height: 1;
    letter-spacing: -1px;
    margin-bottom: 8px;
}

.cs_gestational_label {
    font-size: 14px;
    font-weight: 400;
    opacity: .65;
    text-transform: uppercase;
    letter-spacing: .08em;
    margin-bottom: 28px;
}

.cs_hero_stats {
    display: flex;
    justify-content: center;
    gap: 56px;
}

@media (max-width: 480px) {
    .cs_hero_stats { gap: 28px; flex-wrap: wrap; }
}

.cs_stat_value {
    font-size: 22px;
    font-weight: 700;
    color: #fc0;
    margin-bottom: 4px;
}

.cs_hero_stat_label {
    font-size: 13px;
    font-weight: 300;
    opacity: .75;
}

/* ── Progress ──────────────────────────────────────────── */
.cs_progress_container {
    background: #f6f1e8;
    padding: 24px 40px;
    border-top: 1px solid rgba(10, 45, 105, .08);
}

@media (max-width: 600px) {
    .cs_progress_container { padding: 20px; }
}

.cs_progress_bar_wrap {
    height: 8px;
    background: #D7CBB7;
    border-radius: 100px;
    overflow: hidden;
    margin-bottom: 10px;
}

.cs_progress_bar_fill {
    height: 100%;
    background: linear-gradient(90deg, #204d99, #0478ff);
    border-radius: 100px;
    transition: width .6s ease;
}

.cs_progress_labels {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    font-weight: 400;
    color: #8b877e;
    margin-bottom: 20px;
}

.cs_progress_labels span:nth-child(2) {
    font-weight: 700;
    color: #204d99;
}

/* ── Trimesters ────────────────────────────────────────── */
.cs_trimesters_row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.cs_trim_badge {
    border: 1px solid #D7CBB7;
    border-radius: 4px;
    padding: 10px 12px;
    font-size: 13px;
    font-weight: 400;
    color: #8b877e;
    text-align: center;
    background: #fff;
    transition: background .2s, border-color .2s, color .2s;
}

.cs_trim_badge.cs_active {
    background: #0a2d69;
    border-color: #0a2d69;
    color: #fff;
}

.cs_t_label {
    display: block;
    font-weight: 700;
    font-size: 13px;
    margin-bottom: 2px;
}

/* ── Analyses Section ──────────────────────────────────── */
.cs_analyses_section {
    background: #fff;
    padding: 32px 40px;
    border-top: 1px solid #EDE4D5;
    box-shadow: 0 12px 16px rgba(10, 45, 105, 0.06);
}

@media (max-width: 600px) {
    .cs_analyses_section { padding: 24px 20px; }
}

/* ── Section Divider ───────────────────────────────────── */
.cs_section_divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 24px 0 12px;
    color: #8b877e;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .1em;
}

.cs_section_divider::before,
.cs_section_divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #EDE4D5;
}

.cs_section_divider:first-child { margin-top: 0; }

/* ── Analysis Item ─────────────────────────────────────── */
.cs_analysis_item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 16px 0;
    border-bottom: 1px solid #EDE4D5;
}

.cs_analysis_item:last-child { border-bottom: none; }

.cs_analysis_icon {
    flex-shrink: 0;
    margin-top: 2px;
    display: flex;
    align-items: flex-start;
}

.cs_analysis_icon svg {
    display: block;
}

.cs_analysis_content {
    flex: 1;
    min-width: 0;
}

.cs_analysis_name {
    font-size: 16px;
    font-weight: 600;
    color: #0a2d69;
    margin-bottom: 3px;
    line-height: 1.3;
}

.cs_analysis_period {
    font-size: 13px;
    font-weight: 400;
    color: #7d8f9b;
    margin-bottom: 5px;
}

.cs_analysis_description {
    font-size: 14px;
    font-weight: 300;
    color: #8b877e;
    line-height: 1.55;
}

/* ── Status Badge ──────────────────────────────────────── */
.cs_status_badge {
    flex-shrink: 0;
    font-size: 11px;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 200px;
    white-space: nowrap;
    align-self: flex-start;
    margin-top: 2px;
    letter-spacing: .02em;
}

.cs_status_badge.cs_past {
    background: #f6f1e8;
    color: #8b877e;
}

.cs_status_badge.cs_urgent {
    background: #204d99;
    color: #fff;
}

.cs_status_badge.cs_upcoming {
    background: #ddf2ff;
    color: #204d99;
}

.cs_analysis_item.cs_past .cs_analysis_name,
.cs_analysis_item.cs_past .cs_analysis_description {
    opacity: .55;
}

/* ── Disclaimer ────────────────────────────────────────── */
.cs_disclaimer {
    font-size: 13px;
    font-weight: 300;
    color: #8b877e;
    margin: 20px 0 0;
    padding-top: 20px;
    border-top: 1px solid #EDE4D5;
    line-height: 1.6;
}

/* ── Error box ─────────────────────────────────────────── */
.cs_error_box {
    background: #fff8f0;
    border: 1px solid #de620f;
    border-radius: 4px;
    padding: 40px 40px 36px;
    text-align: center;
}

@media (max-width: 600px) {
    .cs_error_box { padding: 28px 20px 24px; }
}

.cs_error_text {
    font-size: 16px;
    font-weight: 400;
    color: #0a2d69;
    margin: 0 0 28px;
    line-height: 1.65;
    max-width: 520px;
    margin-left: auto;
    margin-right: auto;
}

.cs_error_actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 28px;
    flex-wrap: wrap;
}

/* ── CTA wrap (footer results) ─────────────────────────── */
.cs_cta_wrap {
    background: #f6f1e8;
    padding: 24px 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
    border-top: 1px solid #EDE4D5;
}

@media (max-width: 600px) {
    .cs_cta_wrap {
        padding: 20px;
        flex-direction: column;
        align-items: flex-start;
    }
}

.cs_cta_text {
    font-size: 15px;
    font-weight: 400;
    color: #204d99;
    margin: 0;
    flex: 1;
    min-width: 180px;
    line-height: 1.5;
}

.cs_bottom_actions {
    display: flex;
    align-items: center;
    gap: 24px;
    flex-shrink: 0;
}

@media (max-width: 600px) {
    .cs_cta_wrap {
        flex-direction: column !important;
        align-items: flex-start !important;
    }
    .cs_bottom_actions {
        flex-direction: column !important;
        align-items: center !important;
        width: 100% !important;
        gap: 16px !important;
    }
    .cs_bottom_actions .cs_btn,
    .cs_bottom_actions a.cs_btn {
        width: 100% !important;
        justify-content: center !important;
    }
    .cs_bottom_actions .cs_recalculate {
        text-align: center !important;
    }
    .cs_error_actions {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 16px !important;
    }
    .cs_error_actions .cs_btn,
    .cs_error_actions a.cs_btn {
        width: 100% !important;
        justify-content: center !important;
    }
    .cs_error_actions .cs_recalculate {
        text-align: center !important;
    }
}

.cs_recalculate {
    display: inline-block;
    font-family: Switzer, system-ui, sans-serif;
    font-size: 15px;
    font-weight: 500;
    color: #204d99;
    text-decoration: none;
    border-bottom: 1px solid rgba(32, 77, 153, .3);
    padding-bottom: 1px;
    transition: color .2s, border-color .2s;
}

.cs_recalculate:hover {
    color: #0478ff;
    border-color: #0478ff;
}
