/**
 * Ballyhass Booking Widget — Component styles
 * Enqueued on single-activity pages (is_singular('activity')).
 */

/* ── Widget container ─────────────────────────────────────────────────── */
.c-booking-widget {
    padding: 24px;
    background: #fff;
    border-radius: 8px;
}

/* ── Section label ────────────────────────────────────────────────────── */
.booking-widget__label {
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 10px;
    color: #21272F;
}

/* ── Timeslot grid ────────────────────────────────────────────────────── */
.booking-widget__timeslots {
    margin: 16px 0;
}

.timeslot-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 8px;
    margin-top: 8px;
}

.timeslot-cell {
    display: contents;
}

.timeslot-btn {
    padding: 10px 12px;
    border: 2px solid #dde0e8;
    border-radius: 6px;
    background: #fff;
    cursor: pointer;
    font-size: 0.85rem;
    text-align: left;
    transition: all 0.15s;
    line-height: 1.3;
}

.timeslot-btn:hover:not(:disabled):not(.full) {
    border-color: #05BCD9;
    background: #f0fbfd;
}

.timeslot-btn.selected {
    border-color: #05BCD9;
    background: #05BCD9;
    color: #fff;
}

.timeslot-btn.full {
    opacity: 0.5;
    cursor: not-allowed;
    border-color: #ddd;
}

.timeslot-btn.waitlist {
    border-color: #E4FF1A;
    background: #f9ffe0;
    color: #21272F;
}

.timeslot-btn.waitlist:hover {
    background: #E4FF1A;
}

/* ── Quantity selectors ───────────────────────────────────────────────── */
.booking-widget__quantities {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 16px 0;
}

.qty-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    background: #f7f8fb;
    border-radius: 6px;
}

.qty-label {
    font-size: 0.9rem;
    color: #21272F;
    flex: 1;
}

.qty-btn {
    width: 32px;
    height: 32px;
    border: 1px solid #c8ccd6;
    border-radius: 50%;
    background: #fff;
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    transition: background 0.1s, border-color 0.1s;
}

.qty-btn:hover {
    background: #e8f9fc;
    border-color: #05BCD9;
}

.qty-value {
    font-size: 1rem;
    min-width: 28px;
    text-align: center;
    font-weight: 600;
}

/* ── Book button ──────────────────────────────────────────────────────── */
.btn--book {
    background: #E4FF1A;
    color: #21272F;
    border: none;
    padding: 14px 28px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    width: 100%;
    margin-top: 12px;
    transition: background 0.15s;
}

.btn--book:hover:not(:disabled) {
    background: #d4ef0a;
}

.btn--book:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ── Added to cart ────────────────────────────────────────────────────── */
.booking-widget__added {
    background: #d1fae5;
    border: 1px solid #6ee7b7;
    border-radius: 6px;
    padding: 12px 16px;
    margin-top: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
}

.booking-widget__added a {
    color: #065f46;
    font-weight: 600;
}

/* ── Member badge ─────────────────────────────────────────────────────── */
.booking-widget__member-badge {
    background: #E4FF1A;
    color: #21272F;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 3px;
    margin-left: 8px;
    vertical-align: middle;
}

/* ── Error message ────────────────────────────────────────────────────── */
.booking-widget__error {
    color: #9b1c1c;
    background: #fef0f0;
    border: 1px solid #f4a8a8;
    border-radius: 4px;
    padding: 8px 12px;
    margin-top: 8px;
    font-size: 0.875rem;
}

/* ── Waitlist modal ───────────────────────────────────────────────────── */
.booking-widget__modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .5);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.booking-widget__modal {
    background: #fff;
    border-radius: 8px;
    padding: 28px 32px;
    max-width: 480px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .3);
}

.booking-widget__modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.booking-widget__modal-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #21272F;
    margin: 0;
}

.booking-widget__modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    color: #555;
    padding: 0 4px;
}

.booking-widget__modal-close:hover {
    color: #21272F;
}

.booking-widget__waitlist-desc {
    font-size: 0.9rem;
    color: #555;
    margin-bottom: 20px;
}

.booking-widget__field {
    margin-bottom: 14px;
}

.booking-widget__field label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 4px;
    color: #21272F;
}

.booking-widget__field input {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid var(--bh-field-edge, #767F89);
    border-radius: 6px;
    font-size: 0.9rem;
    transition: border-color 0.15s;
    box-sizing: border-box;
}

.booking-widget__field input:focus {
    outline: none;
    border-color: #05BCD9;
    box-shadow: 0 0 0 3px rgba(5, 188, 217, .15);
}

.booking-widget__waitlist-success {
    text-align: center;
    padding: 20px 0;
}

.booking-widget__waitlist-success svg {
    display: block;
    margin: 0 auto 12px;
}

.booking-widget__waitlist-success p {
    margin: 8px 0;
}

.booking-widget__waitlist-success strong {
    font-size: 1.05rem;
    display: block;
    margin-bottom: 6px;
}
