/* ═══════════════════════════════════════════════════════
   JamJam Events — Recurring Booking Widget v4
   Dark card, gold accents, readable calendar
   ═══════════════════════════════════════════════════════ */

/* Fallback accent — overridden by :root from PHP settings */
:root { --rb-accent: #c9a96e; }

/* ── Accent colour — falls back to button colour, then gold ── */
.jje-rb-wrap {
    max-width: 500px;
    margin: 0 auto;
    font-family: inherit;
}

/* ── Button inheritance reset ─────────────────────────── */
.jje-rb-wrap button,
.jje-rb-wrap input,
.jje-rb-wrap select {
    font-family: inherit;
    box-sizing: border-box;
}

/* ── Each step is a dark card ────────────────────────── */
.jje-rb-step { display: none; }

.jje-rb-step--active {
    display: block;
    background: #1e1e1e;
    border-radius: 20px;
    box-shadow: 0 12px 48px rgba(0,0,0,0.5);
    padding: 30px 28px 26px;
    color: #fff;
    overflow: hidden;
    box-sizing: border-box;
}

/* ── Step tracker ────────────────────────────────────── */
.jje-rb-step-title {
    font-size: 10px !important;
    font-weight: 800 !important;
    letter-spacing: 2.5px !important;
    text-transform: uppercase !important;
    color: #ddd !important;
    margin: 0 0 6px !important;
    display: block !important;
    font-family: inherit !important;
    line-height: 1 !important;
}

.jje-rb-subtitle {
    font-size: 26px !important;
    font-weight: 900 !important;
    color: #ffffff !important;
    margin: 0 0 22px !important;
    line-height: 1.1 !important;
    font-family: inherit !important;
}

/* ── Calendar header ─────────────────────────────────── */
.jje-rb-cal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
}

.jje-rb-cal-month {
    font-weight: 800;
    font-size: 18px;
    color: #fff;
}

.jje-rb-wrap .jje-rb-cal-nav,
.jje-rb-wrap .jje-rb-cal-nav:visited,
.jje-rb-wrap .jje-rb-cal-nav:focus {
    all: unset !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 32px !important;
    height: 32px !important;
    min-width: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    border-radius: 50% !important;
    background: #3a3a3a !important;
    cursor: pointer !important;
    font-size: 16px !important;
    color: #ddd !important;
    transition: background 0.15s, color 0.15s !important;
    line-height: 1 !important;
    border: none !important;
    box-shadow: none !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
}
.jje-rb-wrap .jje-rb-cal-nav:hover:not(:disabled) {
    background: var(--rb-accent) !important;
    color: #fff !important;
}
.jje-rb-wrap .jje-rb-cal-nav:disabled { opacity: 0.2 !important; cursor: default !important; }

/* ── Calendar grid ───────────────────────────────────── */
.jje-rb-cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 3px;
    width: 100%;
}

.jje-rb-cal-day-name {
    text-align: center;
    font-size: 10px;
    font-weight: 700;
    color: #ddd;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    padding-bottom: 8px;
}

.jje-rb-cal-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: default;
    transition: transform 0.12s, box-shadow 0.12s;
    position: relative;
    /* Default: non-event days — clearly visible */
    color: #bbb !important;
    background: #2d2d2d;
}

.jje-rb-cal-day--empty  { background: transparent !important; color: transparent !important; }
.jje-rb-cal-day--past   { color: #999 !important; }
.jje-rb-cal-day--other  { color: #999 !important; }

/* Available Saturday — gold, bold, clearly clickable */
.jje-rb-cal-day--available {
    background: var(--rb-accent) !important;
    color: #fff !important;
    cursor: pointer !important;
    font-weight: 900 !important;
    box-shadow: 0 3px 14px rgba(0,0,0,0.35) !important;
}
.jje-rb-cal-day--available:hover {
    transform: scale(1.12) !important;
    box-shadow: 0 6px 20px rgba(0,0,0,0.45) !important;
}

/* Sold out — strikethrough, very muted */
.jje-rb-cal-day--sold-out {
    color: #bbb !important;
    text-decoration: line-through;
    background: transparent !important;
}

/* Selected — white filled */
.jje-rb-cal-day--selected {
    background: #fff !important;
    color: #111 !important;
    transform: scale(1.12) !important;
    font-weight: 900 !important;
    box-shadow: 0 6px 20px rgba(0,0,0,0.45) !important;
}

/* Today dot */
.jje-rb-cal-day--today::after {
    content: '';
    position: absolute;
    bottom: 3px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--rb-accent);
}
.jje-rb-cal-day--available.jje-rb-cal-day--today::after,
.jje-rb-cal-day--selected.jje-rb-cal-day--today::after {
    background: rgba(255,255,255,0.6);
}

/* ── Legend ──────────────────────────────────────────── */
.jje-rb-legend {
    display: flex;
    gap: 20px;
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid #333;
}
.jje-rb-legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    color: #bbb;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    font-weight: 600;
}
.jje-rb-legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 3px;
    flex-shrink: 0;
}
.jje-rb-legend-dot--available { background: var(--rb-accent); }
.jje-rb-legend-dot--sold-out  { background: #3a3a3a; }

/* ── Chosen date label ───────────────────────────────── */
.jje-rb-chosen-date {
    font-size: 13px;
    font-weight: 800;
    color: #ddd;
    margin: 0 0 16px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

/* ── Slots ───────────────────────────────────────────── */
.jje-rb-slots {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
}

.jje-rb-slot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px;
    border: 2px solid #333;
    border-radius: 14px;
    cursor: pointer;
    background: #2d2d2d;
    transition: border-color 0.15s, background 0.15s, transform 0.12s;
}
.jje-rb-slot:hover:not(.jje-rb-slot--sold-out):not(.jje-rb-slot--insufficient) {
    border-color: var(--rb-accent);
    background: #383838;
    transform: translateX(4px);
}
.jje-rb-slot--sold-out { opacity: 0.3; cursor: not-allowed; }
.jje-rb-slot--insufficient { opacity: 0.55; cursor: not-allowed; }
.jje-rb-slot--insufficient .jje-rb-slot-arrow { display: none; }

.jje-rb-slot-left { display: flex; flex-direction: column; gap: 4px; }

.jje-rb-slot-time {
    font-size: 26px !important;
    font-weight: 900 !important;
    color: #fff !important;
    line-height: 1 !important;
    font-family: inherit !important;
    letter-spacing: -0.5px !important;
}
.jje-rb-slot-remaining {
    font-size: 11px;
    color: #ddd;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}
.jje-rb-slot--low .jje-rb-slot-remaining { color: #e67e22; }

.jje-rb-slot-arrow {
    font-size: 22px;
    color: var(--rb-accent);
    opacity: 0;
    transition: opacity 0.15s, transform 0.15s;
}
.jje-rb-slot:hover:not(.jje-rb-slot--sold-out):not(.jje-rb-slot--insufficient) .jje-rb-slot-arrow {
    opacity: 1;
    transform: translateX(3px);
}
.jje-rb-slot-sold-out-label {
    font-size: 11px;
    color: #bbb;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

/* ── Summary bar ─────────────────────────────────────── */
.jje-rb-summary-bar {
    background: #333;
    border-radius: 12px;
    padding: 14px 18px;
    font-size: 14px;
    font-weight: 600;
    color: #eee;
    margin-bottom: 22px;
}

/* ── Fields ──────────────────────────────────────────── */
.jje-rb-field { margin-bottom: 20px; }

.jje-rb-field label {
    display: block !important;
    font-size: 10px !important;
    font-weight: 800 !important;
    color: #ddd !important;
    text-transform: uppercase !important;
    letter-spacing: 2px !important;
    margin-bottom: 10px !important;
    font-family: inherit !important;
}
.jje-rb-req { color: var(--rb-accent); }

.jje-rb-field select {
    width: 100% !important;
    padding: 14px 16px !important;
    border: 2px solid #3a3a3a !important;
    border-radius: 12px !important;
    font-size: 15px !important;
    background: #333 !important;
    color: #fff !important;
    appearance: auto !important;
    transition: border-color 0.15s !important;
    box-shadow: none !important;
    box-sizing: border-box !important;
}
.jje-rb-field select option { background: #333; color: #fff; }
.jje-rb-field select:focus {
    outline: none !important;
    border-color: var(--rb-accent) !important;
}

/* ── Guest stepper ───────────────────────────────────── */
.jje-rb-stepper {
    display: inline-flex;
    align-items: center;
    border: 2px solid #3a3a3a;
    border-radius: 14px;
    overflow: hidden;
    background: #333;
}

.jje-rb-wrap .jje-rb-stepper-btn,
.jje-rb-wrap .jje-rb-stepper-btn:visited,
.jje-rb-wrap .jje-rb-stepper-btn:focus {
    all: unset !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 52px !important;
    height: 52px !important;
    min-width: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    background: #3a3a3a !important;
    cursor: pointer !important;
    font-size: 28px !important;
    font-weight: 300 !important;
    color: #ddd !important;
    transition: background 0.15s, color 0.15s !important;
    user-select: none !important;
    border: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    line-height: 1 !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
}
.jje-rb-wrap .jje-rb-stepper-btn:hover { background: var(--rb-accent) !important; color: #fff !important; }

.jje-rb-stepper input {
    all: unset !important;
    text-align: center !important;
    width: 72px !important;
    font-size: 24px !important;
    font-weight: 900 !important;
    color: #fff !important;
    pointer-events: none !important;
    background: transparent !important;
}

/* ── Price preview ───────────────────────────────────── */
.jje-rb-price-preview {
    background: #333;
    border: 1px solid #3a3a3a;
    border-radius: 14px;
    padding: 18px 20px;
    margin: 20px 0;
}
.jje-rb-price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    color: #bbb;
    padding: 4px 0;
}
.jje-rb-price-row strong {
    font-size: 28px;
    font-weight: 900;
    color: #fff;
    letter-spacing: -0.5px;
}
.jje-rb-price-row--balance {
    border-top: 1px solid #3a3a3a;
    margin-top: 10px;
    padding-top: 12px;
    color: #bbb;
    font-size: 13px;
}
.jje-rb-price-row--balance strong { font-size: 16px; color: #bbb; }

/* ── Actions ─────────────────────────────────────────── */
.jje-rb-actions {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 20px;
}

.jje-rb-wrap .jje-rb-btn-book,
.jje-rb-wrap .jje-rb-btn-book:visited {
    all: unset !important;
    flex: 1 !important;
    display: block !important;
    text-align: center !important;
    background: var(--rb-accent) !important;
    color: #fff !important;
    padding: 17px 28px !important;
    border-radius: 14px !important;
    font-size: 14px !important;
    font-weight: 800 !important;
    text-transform: uppercase !important;
    letter-spacing: 1.5px !important;
    cursor: pointer !important;
    transition: opacity 0.2s, transform 0.15s !important;
    box-shadow: 0 4px 20px rgba(0,0,0,0.4) !important;
    box-sizing: border-box !important;
    border: none !important;
    line-height: 1 !important;
}
.jje-rb-wrap .jje-rb-btn-book:hover:not(:disabled) { opacity: 0.88 !important; transform: translateY(-2px) !important; }
.jje-rb-wrap .jje-rb-btn-book:disabled { opacity: 0.35 !important; cursor: not-allowed !important; transform: none !important; }

.jje-rb-wrap .jje-rb-back,
.jje-rb-wrap .jje-rb-back:visited {
    all: unset !important;
    color: #ddd !important;
    font-size: 11px !important;
    cursor: pointer !important;
    text-transform: uppercase !important;
    letter-spacing: 1.5px !important;
    font-weight: 700 !important;
    transition: color 0.15s !important;
    white-space: nowrap !important;
    background: none !important;
    border: none !important;
    padding: 0 !important;
    box-shadow: none !important;
    display: inline !important;
}
.jje-rb-wrap .jje-rb-back:hover { color: #ddd !important; }

.jje-rb-error {
    color: #e74c3c;
    font-size: 12px;
    font-weight: 700;
    margin-top: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ── Loading / confirm ───────────────────────────────── */
.jje-rb-loading {
    text-align: center;
    padding: 28px;
    color: #bbb;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.jje-rb-confirm { text-align: center; padding: 52px 20px; }
.jje-rb-spinner {
    width: 44px;
    height: 44px;
    border: 3px solid #333;
    border-top-color: var(--rb-accent);
    border-radius: 50%;
    animation: jje-rb-spin 0.7s linear infinite;
    margin: 0 auto 20px;
}
#jje-rb-confirm-msg { color: #bbb; font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; }
@keyframes jje-rb-spin { to { transform: rotate(360deg); } }

/* ── Responsive ──────────────────────────────────────── */
@media (max-width: 520px) {
    .jje-rb-step--active { padding: 22px 18px 20px; border-radius: 16px; }
    .jje-rb-subtitle { font-size: 22px !important; }
    .jje-rb-cal-day { font-size: 12px; }
    .jje-rb-slot-time { font-size: 20px !important; }
    .jje-rb-actions { flex-direction: column-reverse; }
    .jje-rb-wrap .jje-rb-btn-book { width: 100%; }
}

/* ── Checkbox choice field ───────────────────────────── */

.jje-rb-checkbox-wrap {
    border: 2px solid #3a3a3a;
    border-radius: 12px;
    padding: 16px 18px;
    background: #333;
    transition: border-color 0.15s, background 0.15s;
    cursor: pointer;
}
.jje-rb-checkbox-wrap:hover {
    border-color: var(--rb-accent);
    background: #383838;
}

.jje-rb-checkbox-label {
    display: flex !important;
    align-items: center !important;
    gap: 14px !important;
    cursor: pointer !important;
    margin: 0 !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    color: #fff !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
}

/* Hide native checkbox */
.jje-rb-checkbox-label input[type="checkbox"] {
    position: absolute !important;
    opacity: 0 !important;
    width: 0 !important;
    height: 0 !important;
}

/* Custom checkbox box */
.jje-rb-checkbox-box {
    width: 24px !important;
    height: 24px !important;
    min-width: 24px !important;
    border: 2px solid #555 !important;
    border-radius: 6px !important;
    background: #222 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: border-color 0.15s, background 0.15s !important;
    flex-shrink: 0 !important;
}
.jje-rb-checkbox-label input:checked ~ .jje-rb-checkbox-box {
    background: var(--rb-accent) !important;
    border-color: var(--rb-accent) !important;
}
.jje-rb-checkbox-label input:checked ~ .jje-rb-checkbox-box::after {
    content: '✓' !important;
    color: #fff !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    line-height: 1 !important;
}

.jje-rb-checkbox-text {
    display: flex !important;
    flex-direction: column !important;
    gap: 3px !important;
}

.jje-rb-checkbox-price {
    font-size: 12px !important;
    color: var(--rb-accent) !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
}
