/* ============================================
   CSR Elementor Booking Search Widget Styles
   ============================================ */

/* ── Form Container ───────────────────────── */
.csr-esf-wrapper {
    width: 100%;
}

.csr-esf-form {
    display: flex;
    align-items: center;
    background: #000000;
    border-radius: 8px;
    overflow: visible;
    position: relative;
}

.csr-esf-form.csr-esf-inline {
    flex-direction: row;
    flex-wrap: nowrap;
}

.csr-esf-form.csr-esf-stacked {
    flex-direction: column;
    align-items: stretch;
}

/* ── Individual Field ─────────────────────── */
.csr-esf-field {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 18px;
    flex: 1;
    min-width: 0;
    border: none;
    border-color: rgba(255,255,255,0.2);
    cursor: pointer;
    position: relative;
}

.csr-esf-form.csr-esf-stacked .csr-esf-field {
    padding: 14px 18px;
}

/* ── Divider between fields ───────────────── */
.csr-esf-divider {
    width: 1px;
    height: 36px;
    background-color: rgba(255,255,255,0.2);
    flex-shrink: 0;
}

.csr-esf-form.csr-esf-stacked .csr-esf-divider {
    width: 100%;
    height: 1px;
}

/* ── Icon ─────────────────────────────────── */
.csr-esf-icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
}

.csr-esf-icon svg {
    stroke: currentColor;
}

/* ── Field Inner ──────────────────────────── */
.csr-esf-field-inner {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    flex: 1;
}

/* ── Label ────────────────────────────────── */
.csr-esf-label {
    font-size: 13px;
    font-weight: 500;
    color: #ffffff;
    white-space: nowrap;
    line-height: 1.2;
    display: block;
}

/* ── Inputs ───────────────────────────────── */
.csr-esf-input,
.csr-esf-select {
    border: none !important;
    outline: none !important;
    background: transparent !important;
    color: #ffffff;
    font-size: 14px;
    font-family: inherit;
    padding: 2px 0 !important;
    width: 100%;
    cursor: pointer;
    line-height: 1.4;
    -webkit-appearance: none;
    appearance: none;
    box-shadow: none !important;
    min-height: auto !important;
    height: auto !important;
    margin: 0 !important;
}

.csr-esf-input::placeholder {
    color: rgba(255,255,255,0.5);
}

.csr-esf-select option {
    background: #222;
    color: #fff;
}

/* ── Book Now Button ──────────────────────── */
.csr-esf-btn {
    background: #EFAB00;
    color: #000;
    border: none;
    padding: 14px 32px;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    cursor: pointer;
    border-radius: 8px;
    white-space: nowrap;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
    margin: 8px;
    line-height: 1;
    font-family: inherit;
}

.csr-esf-btn:hover {
    background: #d49a00;
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(239, 171, 0, 0.45);
}

.csr-esf-form.csr-esf-stacked .csr-esf-btn {
    margin: 12px 18px 18px;
}

/* ── Calendar Size Overrides ──────────────── */
/* Large calendar */
.csr-esf-cal-large .flatpickr-calendar {
    width: 340px !important;
    font-size: 15px !important;
}

.csr-esf-cal-large .flatpickr-day {
    width: 42px !important;
    height: 42px !important;
    line-height: 42px !important;
    font-size: 15px !important;
}

.csr-esf-cal-large .flatpickr-months {
    padding: 8px 0 !important;
}

.csr-esf-cal-large .flatpickr-current-month {
    font-size: 16px !important;
}

.csr-esf-cal-large span.flatpickr-weekday {
    font-size: 13px !important;
}

/* Extra large calendar */
.csr-esf-cal-xlarge .flatpickr-calendar {
    width: 400px !important;
    font-size: 16px !important;
}

.csr-esf-cal-xlarge .flatpickr-day {
    width: 50px !important;
    height: 50px !important;
    line-height: 50px !important;
    font-size: 16px !important;
}

.csr-esf-cal-xlarge .flatpickr-months {
    padding: 12px 0 !important;
}

.csr-esf-cal-xlarge .flatpickr-current-month {
    font-size: 18px !important;
}

.csr-esf-cal-xlarge span.flatpickr-weekday {
    font-size: 14px !important;
}

/* ── Booked dates legend ──────────────────── */
.csr-esf-calendar-legend {
    display: flex;
    gap: 16px;
    justify-content: center;
    padding: 8px 12px;
    font-size: 12px;
    color: #6b7280;
    border-top: 1px solid #ebebeb;
}

.csr-esf-legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.csr-esf-legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}

.csr-esf-legend-dot.available {
    background: #34d399;
}

.csr-esf-legend-dot.booked {
    background: #ef4444;
}

/* ── Flatpickr booked dates styling ────────── */
.flatpickr-day.csr-booked {
    background: rgba(239, 68, 68, 0.15) !important;
    color: #ef4444 !important;
    text-decoration: line-through !important;
    cursor: not-allowed !important;
    border-color: transparent !important;
    position: relative;
}

.flatpickr-day.csr-booked::after {
    content: '';
    position: absolute;
    bottom: 3px;
    left: 50%;
    transform: translateX(-50%);
    width: 5px;
    height: 5px;
    background: #ef4444;
    border-radius: 50%;
}

/* Flatpickr theme overrides for this widget */
.csr-esf-wrapper .flatpickr-calendar {
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.18);
    border: 1px solid #e5e7eb;
}

.csr-esf-wrapper .flatpickr-day.selected,
.csr-esf-wrapper .flatpickr-day.startRange,
.csr-esf-wrapper .flatpickr-day.endRange {
    background: #EFAB00 !important;
    border-color: #EFAB00 !important;
    color: #000 !important;
}

.csr-esf-wrapper .flatpickr-day.inRange {
    background: rgba(239, 171, 0, 0.15) !important;
    border-color: transparent !important;
}

.csr-esf-wrapper .flatpickr-day:hover {
    background: rgba(239, 171, 0, 0.25) !important;
    border-color: transparent !important;
}

/* ── Responsive ───────────────────────────── */
@media (max-width: 900px) {
    .csr-esf-form.csr-esf-inline {
        flex-wrap: wrap;
    }
    .csr-esf-field {
        min-width: 140px;
    }
}

@media (max-width: 600px) {
    .csr-esf-form.csr-esf-inline {
        flex-direction: column;
        align-items: stretch;
    }
    .csr-esf-form.csr-esf-inline .csr-esf-divider {
        width: 100%;
        height: 1px;
    }
    .csr-esf-btn {
        margin: 12px !important;
    }
}

/* ── Elementor Editor Preview ─────────────── */
.elementor-editor-active .csr-esf-wrapper {
    min-height: 60px;
}
