/* ═══════════════════════════════════════════════════════════
   Shooting Range Booking – SD SRS
   Dark / Gold theme matching the site aesthetic
   ═══════════════════════════════════════════════════════════ */

/* ── Root variables ─────────────────────────────────── */
.me2d-wrap {
    --gold:        #c9a227;
    --gold-dark:   #a8861d;
    --gold-light:  #e2b93b;
    --bg:          #0a0d12;
    --bg-card:     #111318;
    --bg-field:    #1a1e28;
    --border:      #2a2e3a;
    --border-gold: rgba(201,162,39,.35);
    --text:        #ffffff;
    --text-muted:  #9ca3af;
    --text-dim:    #6b7280;
    --ok:          #22c55e;
    --error:       #ef4444;
    --lane-a:      #c9a227;
    --lane-b:      #3b82f6;
    --lane-c:      #22c55e;
    font-family: inherit;
    color: var(--text);
}

/* ── Card wrapper ────────────────────────────────────── */
.me2d-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-left: 3px solid var(--gold);
    border-radius: 4px;
    max-width: 820px;
    margin: 0 auto;
    padding: 48px 52px 44px;
    position: relative;
}

@media (max-width: 680px) {
    .me2d-card { padding: 28px 22px 26px; }
}

/* ── Card header ─────────────────────────────────────── */
.me2d-card__label {
    display: inline-block;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 3px;
    color: var(--gold);
    text-transform: uppercase;
    margin-bottom: 10px;
}

.me2d-card__label::before {
    content: '';
    display: inline-block;
    width: 24px;
    height: 2px;
    background: var(--gold);
    vertical-align: middle;
    margin-right: 8px;
    margin-bottom: 2px;
}

.me2d-card__title {
    font-size: 2rem;
    font-weight: 900;
    color: var(--text);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin: 0 0 10px;
    line-height: 1.1;
}

.me2d-card__sub {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin: 0 0 36px;
    line-height: 1.6;
}

/* ── Grid ────────────────────────────────────────────── */
.me2d-grid {
    display: grid;
    gap: 20px;
    margin-bottom: 20px;
}

.me2d-grid--2 { grid-template-columns: 1fr 1fr; }

@media (max-width: 560px) {
    .me2d-grid--2 { grid-template-columns: 1fr; }
}

/* ── Fields ──────────────────────────────────────────── */
.me2d-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.me2d-field label {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 2px;
    color: var(--text-muted);
    text-transform: uppercase;
}

.me2d-field .req {
    color: var(--gold);
}

.me2d-field input,
.me2d-field select {
    width: 100%;
    padding: 13px 16px;
    background: var(--bg-field);
    border: 1px solid var(--border);
    border-radius: 3px;
    font-size: 0.95rem;
    color: #ffffff;
    outline: none;
    transition: border-color .2s, box-shadow .2s;
    box-sizing: border-box;
    -webkit-appearance: none;
    appearance: none;
    font-family: inherit;
}

.me2d-field select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23c9a227' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 40px;
    cursor: pointer;
}

.me2d-field input::placeholder {
    color: var(--text-dim);
}

.me2d-field input:focus,
.me2d-field select:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(201,162,39,.15);
}

.me2d-field input.me2d-error,
.me2d-field select.me2d-error {
    border-color: var(--error);
    box-shadow: 0 0 0 3px rgba(239,68,68,.12);
}

/* Date input calendar icon color fix */
.me2d-field input[type="date"]::-webkit-calendar-picker-indicator {
    filter: invert(1) sepia(1) saturate(5) hue-rotate(2deg);
    opacity: .7;
    cursor: pointer;
}

/* ── Availability bar ────────────────────────────────── */
.me2d-avail {
    padding: 12px 18px;
    border-radius: 3px;
    font-size: 0.88rem;
    font-weight: 700;
    letter-spacing: .3px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.me2d-avail--ok {
    background: rgba(34,197,94,.12);
    border: 1px solid rgba(34,197,94,.35);
    color: #4ade80;
}

.me2d-avail--busy {
    background: rgba(239,68,68,.10);
    border: 1px solid rgba(239,68,68,.30);
    color: #f87171;
}

.me2d-avail--checking {
    background: rgba(201,162,39,.08);
    border: 1px solid rgba(201,162,39,.25);
    color: var(--gold);
}

/* ── Disabled select state (duration, until time is chosen) ── */
.me2d-field select:disabled {
    opacity: .38;
    cursor: not-allowed;
    background-image: none;
}

/* ── End-time display ────────────────────────────────── */
.me2d-endtime {
    width: 100%;
    padding: 13px 16px;
    background: var(--bg-field);
    border: 1px solid var(--border);
    border-radius: 3px;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    min-height: 50px;
}

.me2d-endtime__val {
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--text-dim);
    letter-spacing: 1px;
    transition: color .2s;
}

.me2d-endtime__val--active {
    color: var(--gold);
}

/* ── Submit row ──────────────────────────────────────── */
.me2d-submit-row {
    margin-top: 8px;
}

.me2d-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: var(--gold);
    color: #0a0d12;
    border: none;
    border-radius: 3px;
    padding: 16px 40px;
    font-size: 0.9rem;
    font-weight: 900;
    letter-spacing: 2px;
    text-transform: uppercase;
    cursor: pointer;
    transition: background .2s, transform .15s, opacity .2s;
    font-family: inherit;
    position: relative;
    /* Hexagon-clip to match Divi button style */
    clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 50%, calc(100% - 14px) 100%, 0 100%);
    padding-right: 54px;
    min-width: 260px;
}

.me2d-btn::after {
    content: '→';
    font-size: 1rem;
    margin-left: 4px;
}

.me2d-btn:hover:not(:disabled) {
    background: var(--gold-light);
    transform: translateY(-1px);
}

.me2d-btn:disabled {
    opacity: .35;
    cursor: not-allowed;
    transform: none;
}

.me2d-btn__icon {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    flex-shrink: 0;
}

.me2d-btn.is-loading::after { display: none; }
.me2d-btn.is-loading .me2d-btn__icon { display: none; }

/* Spinner */
.btn-spinner {
    display: none;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(10,13,18,.3);
    border-top-color: #0a0d12;
    border-radius: 50%;
    animation: me2d-spin .7s linear infinite;
    flex-shrink: 0;
}

.me2d-btn.is-loading .btn-spinner { display: inline-block; }
.me2d-btn.is-loading .btn-text { opacity: .8; }

@keyframes me2d-spin { to { transform: rotate(360deg); } }

/* ── Response message ────────────────────────────────── */
.me2d-response {
    margin-top: 20px;
    padding: 16px 20px;
    border-radius: 3px;
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.6;
}

.me2d-response.resp-success {
    background: rgba(34,197,94,.10);
    border: 1px solid rgba(34,197,94,.30);
    color: #4ade80;
}

.me2d-response.resp-error {
    background: rgba(239,68,68,.10);
    border: 1px solid rgba(239,68,68,.25);
    color: #f87171;
}

/* ═══════════════════════════════════════════════════════════
   CALENDAR SHORTCODE  [me2d_calendar]
   ═══════════════════════════════════════════════════════════ */

.me2d-cal-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-left: 3px solid var(--gold);
    border-radius: 4px;
    max-width: 820px;
    margin: 0 auto;
    padding: 32px 40px 36px;
    position: relative;
}

@media (max-width: 600px) {
    .me2d-cal-card { padding: 20px 16px 24px; }
}

/* Header */
.me2d-cal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    gap: 12px;
}

.me2d-cal-month-label {
    font-size: 1.1rem;
    font-weight: 900;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--text);
    text-align: center;
    flex: 1;
}

.me2d-cal-nav {
    background: var(--bg-field);
    border: 1px solid var(--border);
    color: var(--gold);
    width: 38px;
    height: 38px;
    border-radius: 3px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .15s, border-color .15s;
    flex-shrink: 0;
    padding: 0;
    line-height: 1;
}

.me2d-cal-nav svg {
    display: block;
    width: 16px;
    height: 16px;
    stroke: var(--gold);
    flex-shrink: 0;
}

.me2d-cal-nav:hover {
    background: rgba(201,162,39,.15);
    border-color: var(--gold);
}

/* Legend */
.me2d-cal-legend {
    display: flex;
    align-items: center;
    gap: 20px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.me2d-cal-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 4px;
    vertical-align: middle;
}

.me2d-dot-a { background: var(--lane-a); }
.me2d-dot-b { background: var(--lane-b); }
.me2d-dot-c { background: var(--lane-c); }

/* Weekday row */
.me2d-cal-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    margin-bottom: 6px;
}

.me2d-cal-wd {
    text-align: center;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--text-dim);
    padding: 6px 0;
}

/* Grid */
.me2d-cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
}

.me2d-cal-loading {
    grid-column: 1 / -1;
    text-align: center;
    color: var(--text-dim);
    padding: 32px;
    font-size: 13px;
    letter-spacing: 1px;
}

/* Day cells */
.me2d-cal-cell {
    aspect-ratio: 1;
    background: var(--bg-field);
    border: 1px solid var(--border);
    border-radius: 3px;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 7px 4px 5px;
    cursor: default;
    transition: border-color .15s, background .15s;
    min-height: 58px;
    overflow: hidden;
}

.me2d-cal-cell--clickable {
    cursor: pointer;
}

.me2d-cal-cell--clickable:hover {
    border-color: var(--gold);
    background: rgba(201,162,39,.06);
}

.me2d-cal-cell--today {
    border-color: var(--gold) !important;
    background: rgba(201,162,39,.08);
}

.me2d-cal-cell--past {
    opacity: .35;
    cursor: default;
}

.me2d-cal-cell--empty {
    background: transparent;
    border-color: transparent;
    cursor: default;
}

.me2d-cal-cell--selected {
    border-color: var(--gold) !important;
    background: rgba(201,162,39,.15) !important;
}

.me2d-cal-num {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-muted);
    line-height: 1;
    margin-bottom: 5px;
}

.me2d-cal-cell--today .me2d-cal-num {
    color: var(--gold);
}

/* Booking dots */
.me2d-cal-dots {
    display: flex;
    gap: 3px;
    flex-wrap: wrap;
    justify-content: center;
}

.me2d-cal-pip {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* Detail panel */
.me2d-cal-detail {
    margin-top: 20px;
    background: var(--bg-field);
    border: 1px solid var(--border-gold);
    border-radius: 4px;
    padding: 22px 26px;
    position: relative;
    animation: me2d-fadeIn .2s ease;
}

@keyframes me2d-fadeIn { from { opacity:0; transform:translateY(6px); } to { opacity:1; transform:none; } }

.me2d-cal-detail-close {
    position: absolute;
    top: 14px;
    right: 16px;
    background: none;
    border: none;
    color: var(--text-dim);
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color .15s;
}
.me2d-cal-detail-close svg { display: block; stroke: currentColor; }
.me2d-cal-detail-close:hover { color: var(--gold); }

.me2d-cal-detail-title {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--gold);
    margin: 0 0 14px;
}

.me2d-cal-slot-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.me2d-cal-slot {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 3px;
    font-size: 13px;
}

.me2d-cal-slot-time {
    font-weight: 800;
    color: var(--text);
    font-size: 15px;
    letter-spacing: .5px;
    min-width: 50px;
}

.me2d-cal-slot-lane {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 3px 10px;
    border-radius: 20px;
}

.me2d-cal-slot-lane--a { background: rgba(201,162,39,.15); color: var(--lane-a); border: 1px solid rgba(201,162,39,.3); }
.me2d-cal-slot-lane--b { background: rgba(59,130,246,.15); color: var(--lane-b); border: 1px solid rgba(59,130,246,.3); }
.me2d-cal-slot-lane--c { background: rgba(34,197,94,.12); color: var(--lane-c); border: 1px solid rgba(34,197,94,.3); }

.me2d-cal-slot-dur {
    margin-left: auto;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-dim);
    white-space: nowrap;
}

/* ═══════════════════════════════════════════════════════════
   MY BOOKINGS  [me2d_my_bookings]
   ═══════════════════════════════════════════════════════════ */

/* Button variants */
.me2d-btn--ghost {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-muted);
    clip-path: none;
    padding-right: 28px;
    min-width: 120px;
    box-shadow: none;
}
.me2d-btn--ghost::after { display: none; }
.me2d-btn--ghost:hover:not(:disabled) {
    background: var(--bg-field);
    border-color: var(--gold);
    color: var(--text);
    transform: none;
}

.me2d-btn--danger {
    background: #991b1b;
    box-shadow: 0 4px 14px rgba(153,27,27,.35);
    min-width: 180px;
}
.me2d-btn--danger:hover:not(:disabled) { background: #b91c1c; }

/* Section headings */
.me2d-mb-section-title {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    color: var(--gold);
    margin: 28px 0 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.me2d-mb-section-title::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}
.me2d-mb-section-title--past { color: var(--text-dim); }

/* Empty states */
.me2d-mb-empty {
    padding: 20px;
    text-align: center;
    color: var(--text-dim);
    font-size: 14px;
}
.me2d-mb-empty--upcoming {
    background: var(--bg-field);
    border: 1px solid var(--border);
    border-radius: 3px;
    margin-bottom: 8px;
}

.me2d-mb-loading {
    color: var(--text-dim);
    font-size: 13px;
    text-align: center;
    padding: 24px 0;
    letter-spacing: 1px;
}

/* Booking card */
.me2d-mb-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 8px; }

.me2d-mb-card {
    display: flex;
    background: var(--bg-field);
    border: 1px solid var(--border);
    border-radius: 4px;
    overflow: hidden;
    transition: border-color .2s;
}
.me2d-mb-card:hover { border-color: rgba(201,162,39,.3); }
.me2d-mb-card--dim { opacity: .5; }

.me2d-mb-card__lane-bar {
    width: 4px;
    flex-shrink: 0;
}

.me2d-mb-card__body {
    flex: 1;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.me2d-mb-card__left { flex: 1; min-width: 180px; }

.me2d-mb-card__date {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.me2d-mb-card__time {
    font-size: 1.35rem;
    font-weight: 900;
    color: var(--text);
    letter-spacing: .5px;
    line-height: 1;
    margin-bottom: 8px;
}

.me2d-mb-card__meta {
    display: flex;
    align-items: center;
    gap: 10px;
}

.me2d-mb-lane {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 3px 10px;
    border-radius: 20px;
}
.me2d-mb-lane--a { background: rgba(201,162,39,.15); color: var(--lane-a); border: 1px solid rgba(201,162,39,.3); }
.me2d-mb-lane--b { background: rgba(59,130,246,.15);  color: var(--lane-b); border: 1px solid rgba(59,130,246,.3); }
.me2d-mb-lane--c { background: rgba(34,197,94,.12);   color: var(--lane-c); border: 1px solid rgba(34,197,94,.3); }

.me2d-mb-dur {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-dim);
}

/* Right column */
.me2d-mb-card__right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    flex-shrink: 0;
}

/* Status badges */
.me2d-mb-badge {
    display: inline-block;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 2px;
}
.me2d-mb-badge--active    { background: rgba(34,197,94,.15);  color: var(--ok);   border: 1px solid rgba(34,197,94,.3); }
.me2d-mb-badge--past      { background: rgba(107,114,128,.12); color: var(--text-dim); border: 1px solid var(--border); }
.me2d-mb-badge--cancelled { background: rgba(239,68,68,.10);  color: #f87171;     border: 1px solid rgba(239,68,68,.25); }

/* Cancel button (inline) */
.me2d-mb-cancel-btn {
    background: none;
    border: 1px solid rgba(239,68,68,.35);
    color: #f87171;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 6px 14px;
    border-radius: 3px;
    cursor: pointer;
    transition: background .15s, border-color .15s;
    font-family: inherit;
}
.me2d-mb-cancel-btn:hover {
    background: rgba(239,68,68,.12);
    border-color: #f87171;
}

.me2d-mb-cancel-note {
    font-size: 10px;
    color: var(--text-dim);
    text-align: right;
    letter-spacing: .3px;
}
.me2d-mb-cancel-note--locked {
    color: #4b5563;
    font-style: italic;
}

/* ── Cancel confirm modal ────────────────────── */
.me2d-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.me2d-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,.75);
    backdrop-filter: blur(4px);
}

.me2d-modal__box {
    position: relative;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-top: 3px solid #ef4444;
    border-radius: 6px;
    padding: 36px 40px 32px;
    max-width: 440px;
    width: 100%;
    text-align: center;
    animation: me2d-modalIn .2s ease;
}

@keyframes me2d-modalIn {
    from { opacity:0; transform:scale(.95) translateY(-10px); }
    to   { opacity:1; transform:none; }
}

.me2d-modal__icon {
    font-size: 2rem;
    margin-bottom: 12px;
    color: #f87171;
}

.me2d-modal__title {
    font-size: 1.1rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text);
    margin: 0 0 14px;
}

.me2d-modal__body {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 28px;
}

.me2d-modal__actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

@media (max-width: 560px) {
    .me2d-mb-card__body { padding: 14px 14px; }
    .me2d-mb-card__right { align-items: flex-start; }
    .me2d-modal__box { padding: 24px 20px 20px; }
}

.me2d-cal-detail-empty {
    color: var(--text-dim);
    font-size: 13px;
    text-align: center;
    padding: 8px 0;
}

/* ═══════════════════════════════════════════════════════════
   MOBILE RESPONSIVE  — booking form, calendar, my bookings
   ═══════════════════════════════════════════════════════════ */

/* ── Booking form ─────────────────────────────────────────── */
@media (max-width: 560px) {

    /* Slightly smaller header */
    .me2d-card__title { font-size: 1.5rem; }
    .me2d-card__sub   { margin-bottom: 20px; font-size: 0.85rem; }

    /* Prevent iOS Safari from auto-zooming on input focus (requires ≥ 16px) */
    .me2d-field input,
    .me2d-field select {
        font-size: 16px;
        padding: 14px 14px;
    }
    .me2d-field select { padding-right: 38px; }

    /* End-time value compact */
    .me2d-endtime__val { font-size: 1.25rem; }

    /* Submit button: full-width, remove the clipped polygon */
    .me2d-btn {
        width: 100%;
        min-width: 0;
        clip-path: none;
        padding-right: 28px;
        padding-left: 24px;
        justify-content: center;
        font-size: 0.85rem;
    }

    /* Availability bar: wraps text better */
    .me2d-avail { font-size: 0.82rem; }
}

/* ── Calendar ─────────────────────────────────────────────── */
@media (max-width: 560px) {

    .me2d-cal-card { padding: 14px 10px 18px; }

    /* Compact header */
    .me2d-cal-month-label { font-size: 0.95rem; letter-spacing: 1px; }
    .me2d-cal-nav { width: 34px; height: 34px; }

    /* Smaller legend */
    .me2d-cal-legend { gap: 10px; font-size: 10px; margin-bottom: 14px; }
    .me2d-cal-dot    { width: 8px; height: 8px; }

    /* Weekday row — very tight on phone, use single letters */
    .me2d-cal-wd {
        font-size: 8px;
        letter-spacing: 0;
        padding: 4px 0;
    }

    /* Grid gap tighter */
    .me2d-cal-grid    { gap: 3px; }
    .me2d-cal-weekdays { gap: 3px; }

    /* Cells: shorter, less padding */
    .me2d-cal-cell {
        min-height: 42px;
        padding: 5px 2px 4px;
    }

    .me2d-cal-num   { font-size: 11px; margin-bottom: 3px; }

    /* Smaller booking dots so they fit */
    .me2d-cal-dots { gap: 2px; margin-top: 1px; }
    .me2d-cal-pip  { width: 5px; height: 5px; }

    /* Detail panel — full-width, stack slot rows */
    .me2d-cal-detail { padding: 16px 14px; }

    .me2d-cal-slot {
        flex-wrap: wrap;
        gap: 6px;
        padding: 10px 10px;
    }

    .me2d-cal-slot-time {
        font-size: 14px;
        min-width: auto;
        width: 100%;
    }

    .me2d-cal-slot-dur { margin-left: 0; }

    /* Bigger tap target for close button */
    .me2d-cal-detail-close {
        padding: 10px;
        top: 8px;
        right: 8px;
    }
}

/* ── My Bookings ──────────────────────────────────────────── */
@media (max-width: 560px) {

    /* Stack left/right columns vertically */
    .me2d-mb-card__body {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        padding: 14px 14px;
    }

    .me2d-mb-card__left  { min-width: 0; width: 100%; }

    /* Right side: badge + cancel button side by side in a row */
    .me2d-mb-card__right {
        flex-direction: row;
        align-items: center;
        flex-wrap: wrap;
        gap: 8px;
        width: 100%;
    }

    /* Cancel button stretches to fill */
    .me2d-mb-cancel-btn  { flex: 1; text-align: center; min-width: 80px; }

    /* Cancel note left-aligned under the button */
    .me2d-mb-cancel-note { text-align: left; width: 100%; margin-top: 0; }

    /* Slightly smaller time display */
    .me2d-mb-card__time { font-size: 1.15rem; }

    /* Modal: stack action buttons */
    .me2d-modal__box { padding: 20px 14px 18px; }

    .me2d-modal__actions {
        flex-direction: column-reverse;
        gap: 10px;
    }

    .me2d-modal__actions .me2d-btn,
    .me2d-modal__actions .me2d-btn--ghost {
        width: 100%;
        min-width: 0;
        clip-path: none;
        padding-right: 24px;
        padding-left: 24px;
    }
}

/* ── Very small screens (≤ 380px) ─────────────────────────── */
@media (max-width: 380px) {
    .me2d-card { padding: 20px 14px 18px; }
    .me2d-card__title { font-size: 1.3rem; }

    .me2d-cal-card { padding: 12px 8px 14px; }
    .me2d-cal-cell { min-height: 36px; padding: 4px 1px 3px; }
    .me2d-cal-num  { font-size: 10px; }
    .me2d-cal-pip  { width: 4px; height: 4px; }
}
