/**
 * MIC — Stilizare Flatpickr (calendar Rezervare Grup)
 * Paletă brand: roșu #be1e2d · teal #48b5cd · piersică #fde1d5
 *               galben #f9ba2f · navy #1f2041 · dark #231f20
 * Fonturi: Baloo 2 (titluri) + Nunito (text) — deja încărcate global
 */

.flatpickr-calendar {
    font-family: 'Nunito', Arial, sans-serif;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid #fde1d5;
    box-shadow: 0 12px 32px rgba(31, 32, 65, 0.18);
    min-width: 300px;
}

/* Săgeata mică (pointer) care indică spre input — colorată ca header-ul */
.flatpickr-calendar.arrowTop:before,
.flatpickr-calendar.arrowTop:after {
    border-bottom-color: #be1e2d;
}
.flatpickr-calendar.arrowBottom:before,
.flatpickr-calendar.arrowBottom:after {
    border-top-color: #be1e2d;
}

/* Header — luna + anul pe aceeași linie, centrate */
.flatpickr-months {
    background: #be1e2d;
    padding: 12px 0 8px;
    position: relative;
    display: flex;
    align-items: center;
}

.flatpickr-current-month {
    font-family: 'Baloo 2', 'Nunito', sans-serif;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 0;
    height: auto;
    line-height: normal;
    position: absolute;
    left: 0;
    right: 0;
    width: 100%;
}

.flatpickr-current-month .flatpickr-monthDropdown-months {
    color: #fff;
    font-weight: 700;
    font-size: 15px;
    background: transparent;
    -webkit-appearance: none;
    border: none;
    padding: 0;
}
.flatpickr-current-month .flatpickr-monthDropdown-months option {
    color: #231f20; /* dropdown-ul nativ are fundal alb — text închis pentru citibilitate */
    background: #fff;
}

.flatpickr-current-month .numInputWrapper {
    width: 58px;
    display: inline-flex;
    align-items: center;
}

.flatpickr-current-month input.cur-year {
    color: #fff;
    font-weight: 700;
    font-size: 15px;
    background: transparent;
    border: none;
    padding: 0;
    width: 100%;
}

/* Săgețile de navigare lună — albe, peste fundalul roșu */
.flatpickr-months .flatpickr-prev-month,
.flatpickr-months .flatpickr-next-month {
    fill: #fff !important;
    color: #fff !important;
    position: relative;
    z-index: 2;
    padding: 8px 12px;
}
.flatpickr-months .flatpickr-prev-month svg,
.flatpickr-months .flatpickr-next-month svg {
    fill: #fff !important;
    width: 14px;
    height: 14px;
}
.flatpickr-months .flatpickr-prev-month:hover svg,
.flatpickr-months .flatpickr-next-month:hover svg {
    fill: #f9ba2f !important;
}

/* Zilele săptămânii (Mon/Tue/Wed...) */
.flatpickr-weekdays {
    background: #fde1d5;
}
span.flatpickr-weekday {
    color: #1f2041;
    font-weight: 700;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* Zilele individuale din grid */
.flatpickr-day {
    border-radius: 8px;
    font-weight: 600;
    color: #231f20;
    border: 1px solid transparent;
}

.flatpickr-day:hover {
    background: #fde1d5;
    border-color: #fde1d5;
    color: #231f20;
}

/* Ziua curentă (azi) — conturată în teal, chiar dacă nu e selectabilă */
.flatpickr-day.today {
    border: 2px solid #48b5cd;
}
.flatpickr-day.today:hover {
    background: #48b5cd;
    color: #fff;
}

/* Ziua selectată — galben, accent principal CTA */
.flatpickr-day.selected,
.flatpickr-day.selected:hover,
.flatpickr-day.selected:focus {
    background: #f9ba2f;
    border-color: #f9ba2f;
    color: #231f20;
    font-weight: 800;
}

/* Zile dezactivate (weekend + Luni/Marți + sub minim 3 zile) */
.flatpickr-day.flatpickr-disabled,
.flatpickr-day.flatpickr-disabled:hover {
    color: #d8d4ce;
    background: transparent;
    cursor: not-allowed;
}

/* Zile din luna anterioară/următoare afișate în grid */
.flatpickr-day.prevMonthDay,
.flatpickr-day.nextMonthDay {
    color: #d8d4ce;
}

/* Linia orizontală subtilă sub header, separă de grid */
.flatpickr-innerContainer {
    border-top: none;
}

/* ============================================================
   Câmpul de input vizibil (altInput) — cu iconiță calendar
   ============================================================ */
input.mic-date-alt-input {
    font-family: 'Nunito', Arial, sans-serif;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23be1e2d' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='3'/%3E%3Cline x1='16' y1='2' x2='16' y2='6'/%3E%3Cline x1='8' y1='2' x2='8' y2='6'/%3E%3Cline x1='3' y1='10' x2='21' y2='10'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 18px;
    padding-right: 42px;
    cursor: pointer;
}

input.mic-date-alt-input::placeholder {
    color: #9c9690;
    font-weight: 500;
    opacity: 1;
}

/* ============================================================
   ✅ Iulie 2026 — Zile cu INTRARE GRATUITĂ la muzeu
   (flag pe excepțiile din MIC → Program → MIC_GROUP_CLOSED.free_dates)
   ============================================================ */
.flatpickr-day.mic-free-day {
    position: relative;
    background: #eaf7ee;
    border-color: #bfe5cb;
    font-weight: 800;
}
.flatpickr-day.mic-free-day::after {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: 3px;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #2e7d32;
}
.flatpickr-day.mic-free-day:hover {
    background: #d9efdf;
    border-color: #bfe5cb;
}
.flatpickr-day.mic-free-day.selected,
.flatpickr-day.mic-free-day.selected:hover {
    background: #f9ba2f;
    border-color: #f9ba2f;
}
.flatpickr-day.mic-free-day.selected::after {
    background: #231f20;
}

/* ============================================================
   ✅ Iulie 2026 — Opțiunea de TUR GHIDAT (checkbox `wants_tour`)

   Se afișează DOAR în zilele cu intrare gratuită.

   ⚠️ JetFormBuilder pune „CSS Class Name" pe INPUT, nu pe wrapper —
   de aceea ascundem RÂNDUL care conține input-ul, prin :has().
   Altfel rămâneau vizibile eticheta „TUR GHIDAT (OPȚIONAL)" și
   textul opțiunii, cu doar căsuța ascunsă.

   Regula CSS ține starea sigură chiar dacă JS-ul nu rulează:
   ascuns by default, vizibil doar cu clasa .mic-tour-visible
   adăugată de JS pe rând.
   ============================================================ */
.jet-form-builder-row:has(.mic-group-tour-field) {
    display: none;
}
.jet-form-builder-row:has(.mic-group-tour-field).mic-tour-visible {
    display: block;
}

/* Accent verde — opțiunea aparține zilei cu intrare gratuită */
.jet-form-builder-row:has(.mic-group-tour-field).mic-tour-visible {
    background: #f4faf5;
    border: 1px solid #d9ecdf;
    border-radius: 10px;
    padding: 12px 14px;
}

.mic-group-tour-field {
    accent-color: #2e7d32;
}
