/* =========================================================
   Surf Booking – Frontend Styles
   Brand: Red #d0021b  |  Dark #1a1a1a
   ========================================================= */

.sb-booking-widget {
    font-family: inherit;
    max-width: 520px;
    margin: 20px 0 28px;
}

/* ----- Product type badges ----- */
.sb-booking-label {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 18px;
    align-items: center;
}
.sb-type-badge, .sb-pack-badge, .sb-spots-badge, .sb-single-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 16px;
    border-radius: 30px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .2px;
    line-height: 1;
}
/* Group = solid brand red, white text */
.sb-type-badge.group {
    background: #d0021b;
    color: #fff;
    border: 2px solid #d0021b;
}
/* Private = dark maroon */
.sb-type-badge.private {
    background: #7a0010;
    color: #fff;
    border: 2px solid #7a0010;
}
/* Pack = white with red border + red text */
.sb-pack-badge {
    background: #fff;
    color: #d0021b;
    border: 2px solid #d0021b;
}
/* Single = white with dark border */
.sb-single-badge {
    background: #fff;
    color: #333;
    border: 2px solid #999;
}
/* People = subtle */
.sb-spots-badge {
    background: #fff;
    color: #555;
    border: 2px solid #bbb;
}

/* ----- Calendar navigation ----- */
.sb-cal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}
.sb-cal-header span {
    font-size: 17px;
    font-weight: 700;
    color: #1a1a1a;
}
.sb-cal-nav {
    background: #d0021b;
    border: none;
    border-radius: 4px;
    width: 36px;
    height: 36px;
    font-size: 22px;
    cursor: pointer;
    line-height: 1;
    color: #fff;
    font-weight: 700;
    transition: background .15s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.sb-cal-nav:hover { background: #a80016; }

/* ----- Legend ----- */
.sb-cal-legend {
    display: flex;
    gap: 14px;
    margin-bottom: 10px;
    font-size: 12px;
    color: #555;
}
.sb-leg {
    display: flex;
    align-items: center;
    gap: 5px;
}
.sb-leg::before {
    content: '';
    display: inline-block;
    width: 13px;
    height: 13px;
    border-radius: 3px;
}
.sb-leg.available::before { background: #d7f2dc; border: 1px solid #2ea04c; }
.sb-leg.limited::before   { background: #fff3cd; border: 1px solid #e0a000; }
.sb-leg.full::before      { background: #fde8e8; border: 1px solid #d0021b; }

/* ----- Day-of-week header ----- */
.sb-cal-days-header {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    font-size: 11px;
    font-weight: 700;
    color: #888;
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: .5px;
}

/* ----- Calendar grid ----- */
.sb-cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 3px;
    margin-bottom: 20px;
}
.sb-cal-loading {
    grid-column: 1 / -1;
    text-align: center;
    padding: 24px;
    color: #888;
    font-style: italic;
}
.sb-day {
    position: relative;
    border-radius: 5px;
    padding: 8px 2px;
    text-align: center;
    font-size: 13px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color .12s, transform .1s;
    user-select: none;
    font-weight: 500;
}
.sb-day.empty       { cursor: default; }
.sb-day.past        { color: #ccc; cursor: default; }
.sb-day.available   { background: #d7f2dc; color: #1a5c27; }
.sb-day.available:hover { border-color: #2ea04c; transform: scale(1.06); }
.sb-day.limited     { background: #fff3cd; color: #7a5c00; }
.sb-day.limited:hover   { border-color: #e0a000; transform: scale(1.06); }
.sb-day.full        { background: #fde8e8; color: #8b0000; cursor: not-allowed; }
.sb-day.closed      { background: #f4f4f4; color: #bbb; cursor: not-allowed; }
.sb-day.selected    { border-color: #d0021b !important; font-weight: 800; }

/* Day count badge (same-date packs) */
.sb-day-count {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #d0021b;
    color: #fff;
    border-radius: 50%;
    width: 15px;
    height: 15px;
    font-size: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
}

/* ----- Session picker ----- */
.sb-session-picker {
    margin: 4px 0 18px;
    padding: 14px 16px;
    background: #fafafa;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
}
.sb-session-picker h4 {
    font-size: 14px;
    margin: 0 0 12px;
    color: #333;
    font-weight: 700;
}
.sb-session-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: border-color .14s, background .14s;
    background: #fff;
}
.sb-session-option:hover:not(.disabled) {
    border-color: #d0021b;
    background: #fff8f8;
}
.sb-session-option.selected {
    border-color: #d0021b;
    background: #fff0f0;
}
.sb-session-option.disabled {
    opacity: .45;
    cursor: not-allowed;
    background: #f9f9f9;
}
.sb-session-option .sb-sess-info h5 {
    margin: 0 0 3px;
    font-size: 14px;
    font-weight: 700;
}
.sb-session-option .sb-sess-info small {
    color: #777;
    font-size: 12px;
}
.sb-sess-avail {
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
    padding: 4px 10px;
    border-radius: 20px;
    margin-left: 10px;
}
.sb-sess-avail.ok   { background: #d7f2dc; color: #1a5c27; }
.sb-sess-avail.warn { background: #fff3cd; color: #7a5c00; }
.sb-sess-avail.none { background: #fde8e8; color: #8b0000; }

/* ----- Pack progress box ----- */
.sb-pack-progress {
    margin: 0 0 16px;
    padding: 14px 16px;
    background: #fafafa;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
}
.sb-pack-label {
    margin: 0 0 10px;
    font-size: 14px;
    font-weight: 700;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #1a1a1a;
}
.sb-pack-label span {
    background: #d0021b;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 12px;
}
.sb-pack-hint {
    margin: 10px 0 0;
    font-size: 12px;
    color: #888;
}
.sb-pack-dates { display: flex; flex-direction: column; gap: 6px; }
.sb-pack-empty {
    color: #aaa;
    font-style: italic;
    font-size: 13px;
    margin: 0;
    padding: 6px 0;
}
.sb-pack-date-chip {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 13px;
}
.sb-pack-date-chip.empty-slot {
    border-style: dashed;
    background: #fafafa;
    opacity: .65;
}
.sb-chip-num {
    background: #d0021b;
    color: #fff;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    min-width: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 800;
}
.sb-chip-info { flex: 1; line-height: 1.4; }
.sb-chip-remove {
    margin-left: auto;
    background: none;
    border: none;
    color: #bbb;
    cursor: pointer;
    font-size: 15px;
    padding: 0 2px;
    line-height: 1;
}
.sb-chip-remove:hover { color: #d0021b; }

/* ----- Participant fields ----- */
.sb-field-group { margin: 16px 0 8px; }
.sb-field-group label {
    display: block;
    font-weight: 700;
    margin-bottom: 5px;
    font-size: 14px;
    color: #1a1a1a;
}
.sb-field-group label small {
    font-weight: 400;
    color: #888;
    font-size: 11px;
}
.sb-booking-widget .sb-field-group input[type="text"],
.sb-booking-widget .sb-field-group input[type="tel"] {
    width: 100% !important;
    padding: 10px 14px !important;
    border: 2px solid #d1d5db !important;
    border-radius: 8px !important;
    font-size: 14px !important;
    box-sizing: border-box !important;
    transition: border-color .15s, box-shadow .15s;
    background: #fff !important;
}
.sb-booking-widget .sb-field-group input[type="text"]:focus,
.sb-booking-widget .sb-field-group input[type="tel"]:focus {
    border-color: #d0021b !important;
    outline: none !important;
    box-shadow: 0 0 0 3px rgba(208,2,27,.12) !important;
}

/* ----- Booking summary ----- */
.sb-selected-summary {
    background: #fff8f8;
    border: 1px solid #f5c6c6;
    border-left: 4px solid #d0021b;
    border-radius: 6px;
    padding: 12px 14px;
    margin-top: 14px;
    font-size: 13px;
    color: #4a0000;
    display: none;
    line-height: 1.6;
}
.sb-selected-summary ul {
    margin: 6px 0 0 16px;
    padding: 0;
}

/* ----- Required field indicator ----- */
.sb-required {
    color: #d0021b;
    margin-left: 3px;
    font-weight: 700;
}
.sb-field-error {
    display: block;
    color: #d0021b;
    font-size: 12px;
    margin-top: 5px;
    font-weight: 600;
}

/* ----- Updated pack hint (two clear options) ----- */
.sb-pack-hint {
    margin: 12px 0 0;
    padding: 10px 12px;
    background: #f0f7ff;
    border-left: 3px solid #4a7adb;
    border-radius: 0 5px 5px 0;
    font-size: 13px;
    color: #333;
}
.sb-pack-hint p {
    margin: 0 0 6px;
    line-height: 1.5;
}
.sb-pack-hint p:last-child {
    margin-bottom: 0;
}

/* ----- Pack: must-select all sessions notice ----- */
.sb-pack-must-select {
    background: #fff3cd;
    border: 2px solid #f0a500;
    border-radius: 8px;
    padding: 10px 14px;
    margin: 10px 0 14px;
    font-size: 13px;
    font-weight: 600;
    color: #7a4f00;
}

/* ----- Pack: required error shown on submit ----- */
.sb-pack-required-error {
    background: #fef2f2;
    border: 2px solid #dc2626;
    border-radius: 8px;
    padding: 12px 16px;
    margin-top: 12px;
    font-size: 13px;
    font-weight: 600;
    color: #991b1b;
}

/* ----- Pack: empty slot chip numbers ----- */
.sb-chip-num--empty {
    background: #cbd5e1 !important;
}
.sb-pack-slot-required {
    color: #b45309;
    font-weight: 600;
    font-style: normal;
}

/* ----- Inline capacity warning below session ----- */
.sb-inline-capacity-warn {
    margin-top: 6px;
    padding: 6px 10px;
    background: #fef9c3;
    border-left: 3px solid #d97706;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    color: #92400e;
}

/* ----- Inline error near Add to Cart button ----- */
#sb-inline-error {
    display: none;
    margin-top: 12px;
    padding: 14px 16px;
    background: #fef2f2;
    border: 2px solid #fca5a5;
    border-radius: 8px;
    color: #991b1b;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.5;
    animation: sb-shake 0.3s ease;
}
@keyframes sb-shake {
    0%,100% { transform: translateX(0); }
    25%      { transform: translateX(-6px); }
    75%      { transform: translateX(6px); }
}
