/**
 * Custom Booking Engine — Frontend styles.
 * Two-column Rezdy/Regiondo-style layout.
 */

/* ── Page layout ── */
.cbe-activity-page {
    display: flex;
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.5;
    color: #333;
}

.cbe-activity-main {
    flex: 1;
    min-width: 0;
}

.cbe-booking-sidebar {
    width: 360px;
    flex-shrink: 0;
}

.cbe-activity-page--compact {
    display: block;
    width: 100%;
    max-width: 420px;
    margin: 0;
}

.cbe-activity-page--compact .cbe-booking-sidebar {
    width: 100%;
}

.cbe-sidebar-inner {
    position: sticky;
    top: 30px;
    border: 1px solid #ddd;
    border-radius: 6px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

.cbe-activity-page--compact .cbe-sidebar-inner {
    position: static;
}

/* ── Title ── */
.cbe-activity-title {
    font-size: 28px;
    font-weight: 700;
    margin: 0 0 20px;
    color: #222;
}

/* ── Featured image ── */
.cbe-featured-image {
    margin-bottom: 15px;
    border-radius: 6px;
    overflow: hidden;
}

.cbe-featured-image img {
    width: 100%;
    height: auto;
    display: block;
}

/* ── Gallery carousel ── */
.cbe-gallery-carousel {
    position: relative;
    margin-bottom: 25px;
    overflow: hidden;
}

.cbe-gallery-track {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 4px 0;
}

.cbe-gallery-track::-webkit-scrollbar {
    display: none;
}

.cbe-gallery-thumb {
    width: 80px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
    cursor: pointer;
    border: 2px solid transparent;
    flex-shrink: 0;
    transition: border-color 0.2s, opacity 0.2s;
    opacity: 0.7;
}

.cbe-gallery-thumb:hover,
.cbe-gallery-thumb.active {
    border-color: #0073aa;
    opacity: 1;
}

.cbe-gallery-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    background: rgba(255,255,255,0.9);
    border: 1px solid #ddd;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    font-size: 18px;
    line-height: 28px;
    text-align: center;
    cursor: pointer;
    color: #333;
    padding: 0;
}

.cbe-gallery-arrow:hover {
    background: #fff;
    box-shadow: 0 1px 4px rgba(0,0,0,0.15);
}

.cbe-gallery-arrow.is-disabled {
    opacity: 0.35;
    pointer-events: none;
}

.cbe-gallery-arrow.is-hidden {
    opacity: 0;
    pointer-events: none;
}

.cbe-gallery-prev { left: 4px; }
.cbe-gallery-next { right: 4px; }

/* ── Activity details ── */
.cbe-activity-details {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 25px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 6px;
    border: 1px solid #eee;
}

.cbe-detail-price {
    display: flex;
    flex-direction: column;
    padding-right: 15px;
    border-right: 1px solid #ddd;
    margin-right: 5px;
}

.cbe-detail-label {
    font-size: 12px;
    color: #777;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.cbe-detail-value {
    font-size: 22px;
    font-weight: 700;
    color: #222;
}

.cbe-detail-item {
    font-size: 14px;
    color: #555;
    display: flex;
    align-items: center;
    gap: 5px;
}

.cbe-detail-item strong {
    color: #333;
}

/* ── Description ── */
.cbe-activity-description {
    font-size: 15px;
    line-height: 1.7;
    color: #444;
    margin-bottom: 30px;
}

/* ── Sidebar ── */
.cbe-sidebar-header {
    background: #0073aa;
    color: #fff;
    padding: 14px 20px;
    font-size: 15px;
    font-weight: 600;
    text-align: center;
}

.cbe-sidebar-body {
    padding: 20px;
}

.cbe-activity-page--compact .cbe-sidebar-body {
    padding: 22px 22px 18px;
}

.cbe-sidebar-section {
    margin-bottom: 20px;
}

.cbe-section-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
}

.cbe-required {
    color: #e00;
}

.cbe-participants-help {
    margin: 0 0 10px;
    font-size: 13px;
    color: #667085;
}

/* ── Participant rows ── */
.cbe-participant-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

.cbe-participant-row:last-child {
    border-bottom: none;
}

.cbe-participant-info {
    display: flex;
    flex-direction: column;
}

.cbe-participant-type {
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.cbe-participant-price {
    font-size: 13px;
    color: #777;
}

.cbe-adults-select,
.cbe-children-select {
    width: 70px;
    padding: 6px 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    background: #fff;
}

.cbe-adults-select:disabled,
.cbe-children-select:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* ── Datepicker (jQuery UI inline) ── */
.cbe-datepicker-inline {
    margin-bottom: 10px;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    box-sizing: border-box;
}

.cbe-datepicker-inline .ui-datepicker {
    width: 100% !important;
    max-width: 100%;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 13px;
    padding: 0;
    background: #fff;
    box-sizing: border-box;
}

.cbe-datepicker-inline .ui-datepicker-header {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f5f5;
    border: none;
    border-bottom: 1px solid #ddd;
    border-radius: 4px 4px 0 0;
    padding: 12px 40px;
    min-height: 48px;
}

.cbe-datepicker-inline .ui-datepicker-title {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.2;
    text-align: center;
}

.cbe-datepicker-inline .ui-datepicker-prev,
.cbe-datepicker-inline .ui-datepicker-next {
    position: absolute;
    top: 50%;
    width: 28px;
    height: 28px;
    margin-top: -14px;
    border: 1px solid #d0d0d0;
    border-radius: 999px;
    background: #fff;
    cursor: pointer;
    overflow: hidden;
    text-indent: -9999px;
    white-space: nowrap;
}

.cbe-datepicker-inline .ui-datepicker-prev {
    left: 8px;
}

.cbe-datepicker-inline .ui-datepicker-next {
    right: 8px;
}

.cbe-datepicker-inline .ui-datepicker-prev::before,
.cbe-datepicker-inline .ui-datepicker-next::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 8px;
    height: 8px;
    border-top: 2px solid #333;
    border-right: 2px solid #333;
    transform-origin: center;
}

.cbe-datepicker-inline .ui-datepicker-prev::before {
    transform: translate(-35%, -50%) rotate(-135deg);
}

.cbe-datepicker-inline .ui-datepicker-next::before {
    transform: translate(-65%, -50%) rotate(45deg);
}

.cbe-datepicker-inline .ui-datepicker-prev:hover,
.cbe-datepicker-inline .ui-datepicker-next:hover {
    background: #f8f8f8;
}

.cbe-datepicker-inline .ui-datepicker-calendar {
    width: 100%;
    table-layout: fixed;
    border-collapse: collapse;
    margin: 0;
}

.cbe-datepicker-inline .ui-datepicker-calendar th,
.cbe-datepicker-inline .ui-datepicker-calendar td {
    width: 14.285%;
    padding: 0;
    text-align: center;
    vertical-align: middle;
    box-sizing: border-box;
}

.cbe-datepicker-inline .ui-datepicker-calendar th {
    padding: 10px 0;
    font-weight: 600;
    color: #444;
}

.cbe-datepicker-inline .ui-datepicker td a,
.cbe-datepicker-inline .ui-datepicker td span {
    display: block;
    width: 100%;
    padding: 10px 0;
    border: 1px solid transparent;
    border-radius: 0;
    text-align: center;
    text-decoration: none;
    box-sizing: border-box;
}

.cbe-datepicker-inline .ui-datepicker-unselectable span {
    color: #b5b5b5;
}

.cbe-datepicker-inline .ui-datepicker td a.ui-state-active {
    background: #0073aa;
    color: #fff;
    border-color: #0073aa;
}

.cbe-date-available a {
    background: #e6f4ea !important;
    color: #1a7431 !important;
    font-weight: bold;
}

.cbe-date-unavailable {
    opacity: 0.35;
    pointer-events: none;
}

/* ── Timeslot select ── */
.cbe-timeslot-select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    background: #fff;
}

.cbe-cross-sell-list {
    display: grid;
    gap: 10px;
}

.cbe-cross-sell-option {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 12px;
    align-items: start;
    padding: 12px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #fafbfc;
    cursor: pointer;
}

.cbe-cross-sell-option input[type="checkbox"] {
    margin-top: 3px;
}

.cbe-cross-sell-option__content {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.cbe-cross-sell-option__title {
    font-size: 14px;
    font-weight: 600;
    color: #222;
}

.cbe-cross-sell-option__description {
    font-size: 12px;
    line-height: 1.5;
    color: #667085;
}

.cbe-cross-sell-option__price {
    font-size: 13px;
    font-weight: 700;
    color: #17375a;
    white-space: nowrap;
}

/* ── Price total ── */
.cbe-price-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    margin-bottom: 15px;
    border-top: 2px solid #eee;
}

.cbe-price-label {
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

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

/* ── CTA button ── */
.cbe-book-now {
    display: block;
    width: 100%;
    padding: 14px;
    background: #e8a020;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: background 0.2s;
}

.cbe-book-now:hover:not(:disabled) {
    background: #d08f10;
}

.cbe-book-now:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* ── Confirmation note ── */
.cbe-confirmation-note {
    font-size: 12px;
    color: #777;
    margin-top: 15px;
    line-height: 1.5;
}

/* ── Messages ── */
.cbe-messages {
    margin-top: 10px;
}

.cbe-messages .cbe-message-success {
    color: #1a7431;
    background: #e6f4ea;
    padding: 10px 14px;
    border-radius: 4px;
    font-size: 14px;
}

.cbe-messages .cbe-message-error {
    color: #a00;
    background: #fce8e8;
    padding: 10px 14px;
    border-radius: 4px;
    font-size: 14px;
}

/* ── Map embed ── */
.cbe-map-embed {
    padding: 0;
    border-top: 1px solid #eee;
}

.cbe-map-embed iframe {
    width: 100%;
    height: 250px;
    border: none;
    display: block;
}

/* ── Responsive ── */
@media (max-width: 860px) {
    .cbe-activity-page {
        flex-direction: column;
    }

    .cbe-booking-sidebar {
        width: 100%;
    }

    .cbe-sidebar-inner {
        position: static;
    }
}

@media (max-width: 480px) {
    .cbe-activity-title {
        font-size: 22px;
    }

    .cbe-detail-price {
        border-right: none;
        padding-right: 0;
        margin-right: 0;
    }

    .cbe-activity-details {
        flex-direction: column;
        gap: 10px;
    }

    .cbe-gallery-thumb {
        width: 60px;
        height: 45px;
    }
}
