/* ======================================================================= */
/* = Theme variables                                                       */
/* ======================================================================= */
:root {
    --accent: #111827;
    --ok: #16a34a;
    --full: #dc2626;
    --muted: #6b7280;
    --border: #e5e7eb;
    --disabled: #f3f4f6;
    --dark: #191919;
}

/* ======================================================================= */
/* = Base layout & scaffolding                                             */
/* ======================================================================= */
.edc-booking {
    max-width: 960px;
    margin: 24px auto;
    padding: 0 12px;
    font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
    color: #111
}

.edc-muted {
    color: var(--muted)
}

.edc-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 14px;
    flex-wrap: wrap;
}

.edc-btn {
    border: 1px solid var(--accent);
    background: #fff;
    border-radius: 10px;
    padding: 10px 14px;
    cursor: pointer
}

.edc-btn[disabled] {
    opacity: .5;
    cursor: not-allowed
}

.edc-btn-primary {
    background: var(--accent);
    color: #fff
}

.edc-note {
    color: var(--muted);
    min-height: 20px
}

/* Steps */
.edc-steps {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.edc-step {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    font-weight: 600
}

.edc-step span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 999px;
    background: #e5e7eb;
    color: #111;
    font-weight: 700
}

.edc-step.is-active span {
    background: var(--accent);
    color: #fff
}

.edc-step.is-active {
    color: #111
}

/* Panels */
.edc-panel {
    display: none;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px 16px 20px;
    animation: fadeIn .18s ease-in
}

.edc-panel.is-active {
    display: block
}

@keyframes fadeIn {
    from {
        opacity: .5;
        transform: translateY(2px)
    }

    to {
        opacity: 1;
        transform: none
    }
}

/* ======================================================================= */
/* = Calendar                                                              */
/* ======================================================================= */
.edc-calendar {
    margin-top: 6px
}

.edc-calendar-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
    flex-wrap: wrap;
    width: 100%;
    justify-content: space-between;
}

.edc-cal-switch-wrapper {
    display: flex;
    width: auto;
    gap: 20px;
    align-items: center;
}

.edc-month-label {
    font-weight: 800;
    font-size: 18px;
    min-width: 180px;
    text-align: center;
    flex: 1 1 auto
}

.edc-cal-btn {
    border: 1px solid var(--border);
    background: #fff;
    border-radius: 10px;
    width: 40px;
    height: 36px;
    cursor: pointer
}

/* Legend */
.edc-legend-wrapper {
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 20px;
    width: auto;
}

.edc-legend {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--ok)
}

.edc-legend i {
    width: 10px;
    height: 20px;
    background: var(--ok);
    display: inline-block;
    border-radius: 4px
}

.edc-legend.edc-legend--full {
    color: var(--full)
}

.edc-legend.edc-legend--full i {
    background: var(--full)
}

/* Grid */
.edc-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 6px
}

.edc-calendar-grid>div {
    font-size: 12px;
    color: var(--muted)
}

.edc-days {
    grid-column: 1/-1;
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 6px;
    transition: transform .18s ease
}

/* Day cells */
.edc-day {
    border: 1px solid var(--border);
    border-radius: 12px;
    min-height: 76px;
    background: #fff;
    padding: 8px;
    position: relative;
    transition: box-shadow .12s, background .12s
}

.edc-day .edc-num {
    font-size: 12px;
    color: var(--muted);
    font-weight: 600
}

.edc-day.is-selected {
    outline: 2px solid var(--accent);
    outline-offset: -2px
}

.edc-day--avail {
    cursor: pointer
}

.edc-day--avail:hover {
    box-shadow: 0 0 0 2px var(--accent) inset
}

.edc-day--disabled {
    background: var(--disabled);
    color: #9ca3af
}

.edc-day--out {
    background: #fafafa;
    color: #cbd5e1
}

.edc-day--out .edc-num {
    color: #cbd5e1
}

/* Status badge (bar + label) */
.edc-badge {
    position: absolute;
    left: 8px;
    bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px
}

.edc-badge .edc-bar {
    width: 10px;
    height: 28px;
    border-radius: 3px;
    display: inline-block
}

.edc-badge .edc-bar-label {
    font-size: 11px;
    line-height: 1
}

.edc-day--avail .edc-badge .edc-bar {
    background: var(--ok)
}

.edc-day--avail .edc-badge .edc-bar-label {
    color: var(--ok)
}

.edc-day--full {
    background: var(--disabled);
    color: #9ca3af;
    cursor: not-allowed
}

.edc-day--full .edc-badge .edc-bar {
    background: var(--full)
}

.edc-day--full .edc-badge .edc-bar-label {
    color: var(--full)
}

/* ======================================================================= */
/* = Form                                                                  */
/* ======================================================================= */

.is-hidden {
    display: none !important;
}

input[type="date"] {
    text-transform: uppercase;
}

.edc-check {
    display: inline-flex;
    align-items: center;
    font-size: clamp(14px, 2.333vw, 15px);
    cursor: pointer;
    gap: 0.6rem;
}

.edc-check input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.edc-check span {
    position: relative;
    padding-left: 2rem;
    color: #111827;
}

.edc-check span::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.1rem;
    width: 1.3rem;
    height: 1.3rem;
    border-radius: 0.3rem;
    border: 2px solid #6b7280;
    background-color: #ffffff;
    box-sizing: border-box;
    transition: border-color 0.15s ease-out, background-color 0.15s ease-out, box-shadow 0.15s ease-out;
}

.edc-check span::after {
    content: "";
    position: absolute;
    left: 0.45rem;
    top: 0.3rem;
    width: 0.4rem;
    height: 0.7rem;
    border-right: 2px solid #ffffff;
    border-bottom: 2px solid #ffffff;
    transform: rotate(45deg) scale(0.6);
    opacity: 0;
    transition: opacity 0.15s ease-out, transform 0.15s ease-out;
}

.edc-check input[type="checkbox"]:checked+span::before {
    background-color: var(--dark);
    border-color: var(--dark);
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.1);
}

.edc-check input[type="checkbox"]:checked+span::after {
    opacity: 1;
    transform: rotate(45deg) scale(1);
}

.edc-check input[type="checkbox"]:focus-visible+span::before {
    outline: 2px solid var(--dark);
    outline-offset: 2px;
}

.edc-check input[type="checkbox"]:disabled+span {
    color: #9ca3af;
    cursor: not-allowed;
}

.edc-check input[type="checkbox"]:disabled+span::before {
    background-color: #f3f4f6;
    border-color: #d1d5db;
    box-shadow: none;
}

.edc-grid {
    display: grid;
    gap: 12px;
    margin-top: 8px
}

.edc-col2 {
    grid-column: span 2
}

@media(max-width: 567px) {
    .edc-steps {
        justify-content: flex-start;
        flex-direction: column;
    }

    .edc-col2 {
        grid-column: 1;
    }
}

.form-legal-link {
    font-weight: 700;
    border-bottom: 1px solid;
}

.edc-grid label {
    display: flex;
    flex-direction: column;
    font-size: 12px;
    color: #374151;
    gap: 6px
}

.edc-grid input,
.edc-grid select,
.edc-grid textarea {
    height: 44px;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 0 12px;
    background: #fff;
    font-size: 14px
}

.edc-grid textarea {
    height: auto;
    padding: 10px 12px
}

.edc-grid input[name="birthdate"] {
    letter-spacing: .1em
}

/* Inline errors (shown directly beneath a field) */
.edc-error {
    margin-top: 6px;
    font-size: 12px;
    line-height: 1.3;
    color: var(--full)
}

.edc-grid input.is-invalid,
.edc-grid select.is-invalid,
.edc-grid textarea.is-invalid {
    border-color: var(--full);
    box-shadow: 0 0 0 2px rgba(220, 38, 38, .08) inset
}

/* ======================================================================= */
/* = Summary                                                               */
/* ======================================================================= */
.edc-summary {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 10px
}

.edc-summary .item {
    background: #f8f8f8;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 10px
}

.edc-summary .item strong {
    display: block;
    font-size: 12px;
    color: #6b7280
}

.edc-summary .item span {
    display: block;
    font-size: 14px;
    color: #111
}

.edc-booking.is-sent [data-step="4"] [data-prev] {
    display: none
}

/* ==== Inline step notes (outside actions) ================================= */
.edc-inline-note {
    margin-top: 6px;
    color: var(--muted);
    min-height: 20px;
}

/* ==== Badge: tag-like label next to the bar =============================== */
.edc-badge {
    position: absolute;
    left: 8px;
    bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.edc-badge .edc-bar {
    width: 10px;
    height: 28px;
    border-radius: 3px;
    display: inline-block;
}

.edc-day--full .edc-badge .edc-bar {
    background: var(--full);
}

.edc-day--full .edc-badge .edc-bar-label {
    color: var(--full);
}

.edc-day--avail .edc-badge .edc-bar {
    background: var(--ok);
}

/* Mobile: hide label chip to save space */
@media (max-width: 640px) {
    .edc-badge .edc-bar-label {
        display: none;
    }
}

/* ==== Inline field errors ================================================= */
.edc-field--error input,
.edc-field--error select,
.edc-field--error textarea {
    border-color: var(--full);
    box-shadow: 0 0 0 2px rgba(220, 38, 38, .08) inset;
}

.edc-field--error .edc-error-msg {
    margin-top: 6px;
    font-size: 12px;
    line-height: 1.3;
    color: var(--full);
}

/* ==== Modal =============================================================== */
.edc-modal {
    position: fixed;
    inset: 0;
    display: none;
    z-index: 1000;
}

.edc-modal.is-open {
    display: block;
}

.edc-modal[aria-hidden="true"] {
    display: none;
}

.edc-modal__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .35);
}

.edc-modal__content {
    position: relative;
    margin: 10vh auto 0;
    max-width: 560px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 18px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .12);
}

.edc-modal__title {
    margin: 0 0 8px;
    font-size: 18px;
    font-weight: 800;
}

.edc-modal__body {
    color: #111;
}

.edc-modal__actions {
    margin-top: 12px;
    display: flex;
    justify-content: flex-end;
}

/* ==== Calendar: minor responsive tweaks ================================== */
@media (max-width: 700px) {
    .edc-month-label {
        font-size: 16px;
        min-width: auto;
    }

    .edc-day {
        min-height: 58px;
        padding: 6px;
    }

    .edc-badge {
        left: 6px;
        bottom: 6px;
        gap: 6px;
    }

    .edc-badge .edc-bar {
        height: 24px;
    }
}

@media (max-width: 480px) {
    .edc-day {
        min-height: 50px;
    }

    .edc-badge .edc-bar {
        width: 8px;
        height: 18px;
    }

    .edc-legend {
        font-size: 12px;
        gap: 4px;
    }

    .edc-legend i {
        width: 8px;
        height: 16px;
    }
}

/* ======================================================================= */
/* = Responsive                                                            */
/* ======================================================================= */
@media (max-width: 900px) {
    .edc-calendar-grid {
        gap: 4px
    }

    .edc-days {
        gap: 4px
    }

    .edc-day {
        min-height: 68px
    }

    .edc-badge {
        left: 6px;
        bottom: 6px;
        gap: 6px
    }

    .edc-badge .edc-bar {
        height: 24px
    }

    .edc-month-label {
        font-size: 16px
    }
}

@media (max-width: 700px) {
    .edc-legend-wrapper {
        justify-content: flex-start;
        gap: 12px
    }

    .edc-cal-btn {
        width: 36px;
        height: 34px
    }

    .edc-calendar-grid {
        grid-template-columns: repeat(7, minmax(42px, 1fr))
    }

    .edc-day {
        min-height: 58px;
        padding: 6px
    }

    .edc-badge .edc-bar-label {
        font-size: 11px
    }
}

@media (max-width: 480px) {
    .edc-calendar-grid {
        grid-template-columns: repeat(7, minmax(36px, 1fr))
    }

    .edc-day {
        min-height: 50px;
        padding: 6px
    }

    .edc-badge {
        gap: 6px;
        left: 6px;
        bottom: 6px
    }

    .edc-badge .edc-bar {
        width: 8px;
        height: 18px
    }

    .edc-badge .edc-bar-label {
        display: none
    }

    /* keep legend text only */
    .edc-legend {
        font-size: 12px;
        gap: 4px
    }

    .edc-legend i {
        width: 8px;
        height: 16px
    }

    /* single column form */
    .edc-summary {
        grid-template-columns: 1fr
    }
}

/* ======================================================================= */
/* = Reduced motion                                                        */
/* ======================================================================= */
@media (prefers-reduced-motion: reduce) {
    .edc-days {
        transition: none
    }

    .edc-panel {
        animation: none
    }
}

/** Booking Notice Banner */
.edc-booking-notice--full {
    background: #000000;
    border-radius: 15px;
    text-align: center;
}

.edc-booking-notice .edc-booking-notice--inner {
    margin: 0 auto;
    padding: 2rem 1.75rem;
    max-width: 31.25rem;
}

.edc-booking-notice .icon-wrapper {
    background: #ffffff;
    width: 45px;
    height: 45px;
    margin: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 100px;
    margin-bottom: 1.5rem;
}

.edc-booking-notice .icon-wrapper span {
    font-size: 22px;
    line-height: 1;
}