/* ═══════════════════════════════════════════
   Sirius Tours Booking — Airbnb-Style Widget
   ═══════════════════════════════════════════ */

/* ── Widget Container ── */
.stb-widget {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: #222;
}

/* ── Theme Override: Reset ALL buttons inside widget ── */
.stb-widget button,
.stb-widget button[type="button"] {
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
    box-sizing: border-box !important;
    margin: 0 !important;
    box-shadow: none !important;
    text-transform: none !important;
    text-decoration: none !important;
    letter-spacing: 0 !important;
    text-shadow: none !important;
    white-space: nowrap !important;
    -webkit-user-select: none !important;
    user-select: none !important;
}

/* ── Price Header ── */
.stb-price-header {
    margin-bottom: 16px;
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 4px;
}

.stb-price-amount {
    font-size: 22px;
    font-weight: 700;
    color: #222;
}

.stb-price-unit {
    font-size: 14px;
    color: #666;
    font-weight: 400;
}

.stb-season-badge {
    font-size: 11px;
    background: #f0f6fc;
    color: #1e3a5f;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 600;
    margin-left: 4px;
}

/* ── Calendar ── */
.stb-calendar-section {
    border: 1px solid #ddd;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px;
    background: #fff;
}

.stb-cal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.stb-cal-month {
    font-size: 15px;
    font-weight: 600;
    color: #222;
}

.stb-cal-nav {
    background: none !important;
    border: 1px solid #ddd !important;
    border-radius: 50% !important;
    width: 32px !important;
    height: 32px !important;
    cursor: pointer !important;
    color: #222 !important;
    transition: background 0.15s, border-color 0.15s !important;
    padding: 0 !important;
    margin: 0 !important;
    line-height: 0 !important;
    font-size: 0 !important;
    min-width: 0 !important;
    min-height: 0 !important;
    max-width: 32px !important;
    max-height: 32px !important;
    box-shadow: none !important;
    text-decoration: none !important;
    overflow: hidden !important;
    flex-shrink: 0 !important;
    position: relative !important;
    display: block !important;
}

.stb-cal-nav svg {
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    width: 14px !important;
    height: 14px !important;
    display: block !important;
    pointer-events: none !important;
}

.stb-cal-nav:hover {
    background: #f7f7f7 !important;
    border-color: #222 !important;
    color: #222 !important;
}

.stb-cal-nav:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

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

.stb-cal-day-name {
    text-align: center;
    font-size: 11px;
    font-weight: 600;
    color: #999;
    text-transform: uppercase;
    padding: 4px 0;
}

.stb-cal-day {
    text-align: center;
    padding: 0;
    position: relative;
}

.stb-cal-day-inner {
    width: 36px;
    height: 36px;
    line-height: 36px;
    margin: 0 auto;
    border-radius: 50%;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
    position: relative;
}

.stb-cal-day-inner:hover {
    background: #f0f0f0;
}

/* Available */
.stb-cal-day.is-available .stb-cal-day-inner {
    color: #222;
    font-weight: 600;
}

.stb-cal-day.is-available .stb-cal-day-inner:hover {
    background: #222;
    color: #fff;
}

/* Selected */
.stb-cal-day.is-selected .stb-cal-day-inner {
    background: #222;
    color: #fff !important;
    font-weight: 700;
}

/* Unavailable */
.stb-cal-day.is-unavailable .stb-cal-day-inner {
    color: #ccc;
    cursor: default;
    text-decoration: line-through;
}

.stb-cal-day.is-unavailable .stb-cal-day-inner:hover {
    background: transparent;
}

/* Past */
.stb-cal-day.is-past .stb-cal-day-inner {
    color: #ddd;
    cursor: default;
}

.stb-cal-day.is-past .stb-cal-day-inner:hover {
    background: transparent;
}

/* Empty cells */
.stb-cal-day.is-empty {
    visibility: hidden;
}

/* Partial availability dot */
.stb-cal-day.is-partial .stb-cal-day-inner::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #f0a500;
}

/* Legend */
.stb-cal-legend {
    display: flex;
    gap: 14px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #f0f0f0;
    font-size: 11px;
    color: #666;
}

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

.stb-cal-dot-available { background: #222; }
.stb-cal-dot-unavailable { background: #ddd; }

/* ── Selection Area ── */
.stb-selection {
    border: 1px solid #ddd;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 16px;
}

.stb-sel-row {
    display: flex;
    border-bottom: 1px solid #ddd;
}

.stb-sel-row:last-child {
    border-bottom: none;
}

.stb-sel-field {
    flex: 1;
    padding: 12px 14px;
}

.stb-sel-field + .stb-sel-field {
    border-left: 1px solid #ddd;
}

.stb-sel-full {
    flex: 1 1 100%;
}

.stb-sel-label {
    display: block;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #222;
    margin-bottom: 4px;
}

.stb-sel-value {
    font-size: 14px;
    color: #222;
    font-weight: 500;
}

/* Tour Type Toggle */
.stb-type-toggle {
    display: flex;
    gap: 8px;
}

.stb-type-btn {
    flex: 1;
    padding: 8px 12px !important;
    border: 2px solid #ddd !important;
    border-radius: 8px !important;
    background: #fff !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    cursor: pointer;
    transition: all 0.15s !important;
    color: #666 !important;
    display: block !important;
    text-align: center !important;
    line-height: 1.4 !important;
    box-shadow: none !important;
    text-decoration: none !important;
    min-width: 0 !important;
}

.stb-type-btn:hover {
    border-color: #222 !important;
    color: #222 !important;
    background: #fff !important;
}

.stb-type-btn.stb-type-active {
    border-color: #222 !important;
    background: #222 !important;
    color: #fff !important;
}

/* Guests Control */
.stb-guests-control {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.stb-guest-btn {
    width: 32px !important;
    height: 32px !important;
    border: 1px solid #999 !important;
    border-radius: 50% !important;
    background: #fff !important;
    cursor: pointer !important;
    color: #222 !important;
    transition: background 0.15s, border-color 0.15s !important;
    padding: 0 !important;
    margin: 0 !important;
    line-height: 0 !important;
    font-size: 0 !important;
    min-width: 0 !important;
    min-height: 0 !important;
    max-width: 32px !important;
    max-height: 32px !important;
    box-shadow: none !important;
    text-decoration: none !important;
    overflow: hidden !important;
    flex-shrink: 0 !important;
    position: relative !important;
    display: block !important;
}

.stb-guest-btn svg {
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    width: 14px !important;
    height: 14px !important;
    display: block !important;
    pointer-events: none !important;
}

.stb-guest-btn:hover {
    border-color: #222 !important;
    background: #f7f7f7 !important;
    color: #222 !important;
}

.stb-guest-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.stb-guest-value {
    display: inline-flex;
    align-items: baseline;
    gap: 6px;
}

.stb-guest-count {
    font-size: 16px;
    font-weight: 600;
}

.stb-guest-label {
    font-size: 14px;
    color: #666;
}

/* ── Price Breakdown ── */
.stb-price-breakdown {
    margin-bottom: 16px;
    padding: 0 4px;
}

.stb-price-line {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    color: #444;
    padding: 4px 0;
}

.stb-price-line u {
    text-decoration: underline;
    text-underline-offset: 2px;
}

.stb-price-total {
    display: flex;
    justify-content: space-between;
    font-size: 15px;
    font-weight: 700;
    color: #222;
    padding-top: 12px;
    margin-top: 8px;
    border-top: 1px solid #ddd;
}

/* ── Reserve Button ── */
.stb-reserve-btn {
    width: 100% !important;
    display: block !important;
    padding: 14px 24px !important;
    border: none !important;
    border-radius: 10px !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    color: #fff !important;
    cursor: pointer !important;
    transition: all 0.2s !important;
    background: linear-gradient(135deg, #e61e4d 0%, #e31c5f 50%, #d70466 100%) !important;
    position: relative !important;
    overflow: hidden !important;
    text-align: center !important;
    line-height: 1.4 !important;
    text-decoration: none !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
    text-shadow: none !important;
    box-sizing: border-box !important;
    box-shadow: none !important;
    margin: 0 !important;
    min-width: 0 !important;
    max-width: 100% !important;
}

.stb-reserve-btn:hover:not(:disabled) {
    transform: scale(1.01);
    box-shadow: 0 4px 16px rgba(230, 30, 77, 0.3);
}

.stb-reserve-btn:active:not(:disabled) {
    transform: scale(0.99);
}

.stb-reserve-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #b0b0b0 !important;
}

.stb-reserve-btn.is-loading {
    pointer-events: none;
    opacity: 0.8;
}

.stb-reserve-btn.is-success {
    background: #008a05 !important;
}

/* ── Note ── */
.stb-note {
    text-align: center;
    font-size: 13px;
    color: #666;
    margin-top: 10px;
    margin-bottom: 0;
}

/* ── Loading State ── */
.stb-cal-grid.is-loading {
    opacity: 0.5;
    pointer-events: none;
}

/* ── Spots Left Badge ── */
.stb-spots-left {
    font-size: 12px;
    color: #e61e4d;
    font-weight: 600;
    margin-top: 4px;
}

/* ── Responsive ── */
@media (max-width: 600px) {
    .stb-cal-day-inner {
        width: 32px;
        height: 32px;
        line-height: 32px;
        font-size: 12px;
    }

    .stb-type-toggle {
        flex-direction: column;
        gap: 6px;
    }
}

/* ── Cart: Booking Details ── */
.woocommerce-cart-form .stb-cart-meta {
    font-size: 13px;
    color: #666;
}

.woocommerce-cart-form .stb-cart-meta dt {
    font-weight: 600;
    display: inline;
}

.woocommerce-cart-form .stb-cart-meta dd {
    display: inline;
    margin: 0;
}

/* ═══════════════════════════════════════════
   MOBILE: Sticky Bar + Full-Screen Modal
   ═══════════════════════════════════════════ */

/* Hidden on desktop */
.stb-mobile-bar,
.stb-modal-overlay {
    display: none !important;
}

@media (max-width: 767px) {

    /* Hide inline widget on mobile */
    .stb-widget {
        display: none !important;
    }

    /* When inside modal, show it again */
    .stb-modal-body .stb-widget {
        display: block !important;
    }

    /* ── Sticky Bottom Bar ── */
    .stb-mobile-bar {
        display: block !important;
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        z-index: 99990 !important;
        background: #dedede !important;
        border-top: 1px solid #ccc !important;
        box-shadow: 0 -2px 10px rgba(0,0,0,0.15) !important;
        padding: 0 !important;
    }

    .stb-mobile-bar-inner {
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        padding: 12px 16px !important;
        max-width: 100% !important;
    }

    .stb-mobile-bar-price {
        display: flex !important;
        flex-direction: column !important;
        gap: 0 !important;
    }

    .stb-mobile-bar-amount {
        font-size: 18px !important;
        font-weight: 700 !important;
        color: #222 !important;
        line-height: 1.2 !important;
        text-decoration: underline !important;
        text-underline-offset: 2px !important;
    }

    .stb-mobile-bar-unit {
        font-size: 12px !important;
        color: #666 !important;
        font-weight: 400 !important;
    }

    .stb-mobile-bar-btn {
        background: linear-gradient(135deg, #e61e4d 0%, #e31c5f 50%, #d70466 100%) !important;
        color: #fff !important;
        border: none !important;
        border-radius: 8px !important;
        padding: 12px 24px !important;
        font-size: 15px !important;
        font-weight: 700 !important;
        cursor: pointer !important;
        line-height: 1.3 !important;
        box-shadow: none !important;
        text-decoration: none !important;
        flex-shrink: 0 !important;
        min-width: 0 !important;
        max-width: none !important;
        display: block !important;
        text-align: center !important;
    }

    .stb-mobile-bar-btn:active {
        opacity: 0.9 !important;
    }

    /* ── Full-Screen Modal ── */
    .stb-modal-overlay {
        display: none !important;
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        z-index: 99999 !important;
        background: rgba(0,0,0,0.5) !important;
    }

    .stb-modal-overlay.is-open {
        display: block !important;
    }

    .stb-modal {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        background: #fff !important;
        display: flex !important;
        flex-direction: column !important;
        overflow: hidden !important;
        z-index: 100000 !important;
    }

    .stb-modal-header {
        display: flex !important;
        align-items: center !important;
        gap: 12px !important;
        padding: 14px 16px !important;
        border-bottom: 1px solid #eee !important;
        flex-shrink: 0 !important;
        background: #fff !important;
    }

    .stb-modal-close {
        width: 36px !important;
        height: 36px !important;
        border: none !important;
        border-radius: 50% !important;
        background: #f7f7f7 !important;
        cursor: pointer !important;
        display: block !important;
        position: relative !important;
        padding: 0 !important;
        margin: 0 !important;
        flex-shrink: 0 !important;
        box-shadow: none !important;
        color: #222 !important;
        font-size: 0 !important;
        line-height: 0 !important;
        min-width: 0 !important;
    }

    .stb-modal-close svg {
        position: absolute !important;
        top: 50% !important;
        left: 50% !important;
        transform: translate(-50%, -50%) !important;
        width: 18px !important;
        height: 18px !important;
        display: block !important;
        pointer-events: none !important;
    }

    .stb-modal-close:active {
        background: #eee !important;
    }

    .stb-modal-title {
        font-size: 16px !important;
        font-weight: 600 !important;
        color: #222 !important;
    }

    .stb-modal-body {
        flex: 1 !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch !important;
        padding: 16px !important;
    }

    /* Widget adjustments inside modal */
    .stb-modal-body .stb-widget {
        max-width: 100% !important;
    }

    .stb-modal-body .stb-reserve-btn {
        margin-bottom: 16px !important;
    }

    /* Body scroll lock when modal is open */
    body.stb-modal-open {
        overflow: hidden !important;
        position: fixed !important;
        width: 100% !important;
        height: 100% !important;
    }

    /* Add padding at bottom of page content so sticky bar doesn't cover content */
    .single-sirius_tour .site-content,
    .single-sirius_tour .entry-content,
    .single-sirius_tour .sirius-tour-single {
        padding-bottom: 80px !important;
    }
}
