.ewc-calendar-wrap {
    width: 100%;
}
.ewc-calendar {
    width: 100%;
}

/* Por defecto la vista móvil está oculta; las media queries la enseñan. */
.ewc-mobile-calendar {
    display: none;
}

.ewc-legend {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 16px;
}
.ewc-legend-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}
.ewc-legend-row--category {
    padding-top: 2px;
}
.ewc-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}
.ewc-legend-color {
    width: 14px;
    height: 14px;
    display: inline-block;
    border-radius: 2px;
}

/* ============ DESKTOP ============ */
.fc .fc-event.ewc-event-split,
.fc .fc-h-event.ewc-event-split,
.fc .fc-daygrid-event.ewc-event-split {
    background: transparent !important;
    background-image: none !important;
    border: 0 !important;
    box-shadow: none !important;
    padding: 0 !important;
}
.fc .ewc-event-split .fc-event-main,
.fc .ewc-event-split .fc-event-main-frame,
.fc .ewc-event-split .fc-event-title-container,
.fc .ewc-event-split .fc-event-title,
.fc .ewc-event-split .fc-daygrid-event-dot {
    background: transparent !important;
    padding: 0 !important;
    color: inherit !important;
}
.ewc-event-inner {
    display: flex;
    align-items: stretch;
    width: 100%;
    min-height: 26px;
    border-radius: 3px;
    overflow: hidden;
    line-height: 1.25;
}
.ewc-event-badge {
    display: inline-block;
    flex: 0 0 16px;
    width: 16px;
    min-height: 100%;
    align-self: stretch;
}
.ewc-event-title {
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    padding: 4px 8px;
    font-size: 13px;
    font-weight: 500;
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: clip !important;
    word-break: break-word;
    overflow-wrap: anywhere;
}
.fc .fc-daygrid-event-harness {
    margin-bottom: 7px !important;
    overflow: visible !important;
}
.fc .fc-daygrid-event-harness + .fc-daygrid-event-harness {
    margin-top: 3px;
}
.fc .fc-daygrid-day-events {
    padding: 6px 2px 10px;
}
.fc .fc-daygrid-day-frame {
    min-height: 130px;
}
.fc .ewc-event-split .fc-event-title,
.fc .ewc-event-split .fc-event-title-container {
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: clip !important;
}
.fc .fc-toolbar-title {
    text-transform: capitalize;
}
.fc .fc-daygrid-block-event,
.fc .fc-h-event {
    overflow: visible !important;
}
.fc .fc-event-main {
    overflow: visible !important;
}
.fc .fc-daygrid-day-frame,
.fc .fc-scrollgrid,
.fc .fc-scroller {
    overflow: visible !important;
}

#wc_bookings_field_persons[readonly]::-webkit-outer-spin-button,
#wc_bookings_field_persons[readonly]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
#wc_bookings_field_persons[readonly] {
    -moz-appearance: textfield;
    cursor: default;
}

/* ==============================================================
   RESPONSIVE — Móvil (≤ 782px)
   ============================================================== */
@media (max-width: 782px) {
    .ewc-calendar-wrap .ewc-calendar {
        display: none !important;
    }
    .ewc-calendar-wrap .ewc-mobile-calendar {
        display: block;
    }

    .ewc-legend {
        gap: 4px;
        margin-bottom: 12px;
    }
    .ewc-legend-row {
        gap: 10px;
    }
    .ewc-legend-item {
        font-size: 12px;
    }

    /* ---------- Cabecera mes ---------- */
    .ewc-m-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 8px;
        padding: 8px 4px 4px;
    }
    .ewc-m-nav-btn {
        background: #1f2a44;
        color: #fff;
        border: 0;
        border-radius: 8px;
        width: 56px;
        height: 40px;
        font-size: 28px;
        font-weight: 700;
        line-height: 1;
        cursor: pointer;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 0 0 4px;
        font-family: Arial, Helvetica, sans-serif;
        -webkit-tap-highlight-color: transparent;
    }
    .ewc-m-nav-btn:hover,
    .ewc-m-nav-btn:focus {
        background: #2a3a5e;
        outline: none;
    }
    .ewc-m-title {
        flex: 1;
        text-align: center;
        font-size: 22px;
        font-weight: 600;
        line-height: 1.15;
        text-transform: capitalize;
        color: #1a1a1a;
    }

    /* ---------- Botón Hoy ---------- */
    .ewc-m-today-wrap {
        display: flex;
        justify-content: center;
        padding: 6px 0 10px;
    }
    .ewc-m-today {
        background: #cfcfcf;
        color: #1a1a1a;
        border: 0;
        border-radius: 6px;
        padding: 6px 22px;
        font-size: 14px;
        font-weight: 500;
        cursor: pointer;
    }
    .ewc-m-today:hover,
    .ewc-m-today:focus {
        background: #b9b9b9;
        outline: none;
    }

    /* ---------- Strip de la semana ---------- */
    .ewc-m-week-strip {
        display: grid;
        grid-template-columns: repeat(7, 1fr);
        gap: 0;
        padding: 4px 0 12px;
        border-bottom: 1px solid #ececec;
    }
    .ewc-m-ws-day {
        background: transparent !important;
        background-color: transparent !important;
        border: 0;
        outline: none;
        padding: 6px 0 6px;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 4px;
        cursor: pointer;
        font-family: inherit;
        color: #1a1a1a;
        -webkit-appearance: none;
        appearance: none;
        -webkit-tap-highlight-color: transparent;
        box-shadow: none !important;
    }
    .ewc-m-ws-day:hover,
    .ewc-m-ws-day:focus,
    .ewc-m-ws-day:active {
        background: transparent !important;
        background-color: transparent !important;
        outline: none;
        box-shadow: none !important;
    }
    .ewc-m-ws-label {
        font-size: 11px;
        letter-spacing: 0.5px;
        color: #666;
        font-weight: 600;
    }
    .ewc-m-ws-num {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 32px;
        height: 32px;
        border-radius: 50%;
        font-size: 14px;
        font-weight: 500;
        color: #1a1a1a;
        background: transparent;
        transition: background 0.12s ease, color 0.12s ease;
    }
    /* Hover sobre la celda → círculo gris claro, NO cuadrado. */
    .ewc-m-ws-day:hover .ewc-m-ws-num,
    .ewc-m-ws-day:focus-visible .ewc-m-ws-num {
        background: #ececec;
    }
    .ewc-m-ws-day.is-selected .ewc-m-ws-num,
    .ewc-m-ws-day.is-selected:hover .ewc-m-ws-num {
        background: #1a1a1a;
        color: #fff;
        font-weight: 600;
    }
    .ewc-m-ws-dot {
        width: 6px;
        height: 6px;
        border-radius: 50%;
        background: transparent;
    }
    .ewc-m-ws-dot.has-events {
        background: #2c7be5;
    }

    /* ---------- Lista de eventos (agenda) ---------- */
    .ewc-m-agenda {
        padding: 14px 0 24px;
    }
    .ewc-m-agenda-group {
        display: grid;
        grid-template-columns: 56px 1fr;
        gap: 12px;
        margin-bottom: 14px;
        align-items: flex-start;
    }
    .ewc-m-agenda-date {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        padding-top: 6px;
        line-height: 1.05;
    }
    .ewc-m-agenda-day-num {
        font-size: 22px;
        font-weight: 700;
        color: #1a1a1a;
    }
    .ewc-m-agenda-day-label {
        font-size: 12px;
        letter-spacing: 0.6px;
        color: #666;
        margin-top: 2px;
        font-weight: 600;
    }
    .ewc-m-agenda-events {
        display: flex;
        flex-direction: column;
        gap: 6px;
        min-width: 0;
    }
    .ewc-m-event-card {
        display: flex;
        align-items: stretch;
        border-radius: 4px;
        overflow: hidden;
        text-decoration: none;
        line-height: 1.25;
        min-height: 34px;
        transition: filter 0.1s ease;
    }
    .ewc-m-event-card:hover,
    .ewc-m-event-card:focus {
        filter: brightness(0.95);
        outline: none;
    }
    .ewc-m-event-badge {
        flex: 0 0 6px;
        align-self: stretch;
        min-height: 100%;
    }
    .ewc-m-event-title {
        flex: 1 1 auto;
        display: flex;
        align-items: center;
        padding: 8px 12px;
        font-size: 13.5px;
        font-weight: 600;
        color: inherit;
        word-break: break-word;
        overflow-wrap: anywhere;
    }

    .ewc-m-empty {
        text-align: center;
        color: #888;
        padding: 32px 16px;
        font-size: 14px;
        background: #f7f7f7;
        border-radius: 6px;
    }
}
