/* ===================================================================
   tc-mobile-bar.css
   Booking sidebar tabs + Enquiry form + Mobile bottom app bar
   + Bottom-sheet drawer (mobile)
   Package details page — Adventra theme
   =================================================================== */

/* --- Booking Sidebar Tabs --- */
.tc-booking-tabs {
    display: flex;
    margin: 0;
    padding: 0;
    list-style: none;
    background: #EFEEFA;
    border-radius: 28px 28px 0 0;
    overflow: hidden;
    position: relative;
}
.tc-booking-tabs::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 24px;
    right: 24px;
    height: 1px;
    background: rgba(77, 64, 202, 0.12);
}
.tc-booking-tabs .nav-item {
    flex: 1;
}
.tc-booking-tabs .nav-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 18px 12px 16px;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    font-family: "Nunito", sans-serif;
    font-size: 15px;
    font-weight: 700;
    color: #8e8aa0;
    cursor: pointer;
    transition: color 0.3s ease, border-color 0.3s ease;
    white-space: nowrap;
    position: relative;
    z-index: 1;
    letter-spacing: 0.2px;
}
.tc-booking-tabs .nav-link:hover {
    color: var(--theme-color, #4d40ca);
}
.tc-booking-tabs .nav-link.active {
    color: var(--theme-color, #4d40ca);
    border-bottom-color: var(--theme-color, #4d40ca);
    font-weight: 800;
}
.tc-booking-tabs .nav-link i {
    font-size: 15px;
}

/* Make .tour-sidebar-items lose its top border-radius when used inside tabs */
.tc-booking-tabs + .tab-content .tour-sidebar-items {
    border-radius: 0 0 28px 28px !important;
}

/* --- Tab content fade transition --- */
.tc-booking-tabs + .tab-content .tab-pane {
    transition: opacity 0.28s ease-in-out;
}
.tc-booking-tabs + .tab-content .tab-pane.fade {
    opacity: 0;
    transition: opacity 0.28s ease-in-out;
}
.tc-booking-tabs + .tab-content .tab-pane.fade.show {
    opacity: 1;
}

/* --- Enquiry Form — match existing sidebar DNA --- */
#pane-enquire .tour-sidebar-items {
    padding-top: 30px;
}
#pane-enquire .tc-enq-intro {
    font-family: "Nunito", sans-serif;
    font-size: 14px;
    line-height: 1.65;
    color: #6b6680;
    margin-bottom: 22px;
}
#pane-enquire .tc-enq-group {
    margin-bottom: 18px;
}
#pane-enquire .tc-enq-label {
    display: block;
    font-family: "Nunito", sans-serif;
    font-size: 14px;
    font-weight: 800;
    color: #455151;
    margin-bottom: 6px;
}
#pane-enquire .tc-enq-label .text-danger {
    color: #e74c3c;
    margin-left: 2px;
}
#pane-enquire .tc-enq-input {
    width: 100%;
    outline: none;
    border: 1px solid rgba(21, 20, 21, 0.15);
    padding: 11px 16px;
    color: #455151;
    background-color: #fff;
    font-family: "Nunito", sans-serif;
    font-size: 14px;
    font-weight: 700;
    border-radius: 8px;
    line-height: 1;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
    -webkit-appearance: none;
}
#pane-enquire .tc-enq-input:focus {
    border-color: var(--theme-color, #4d40ca);
    box-shadow: 0 0 0 3px rgba(77, 64, 202, 0.1);
    outline: none;
}
#pane-enquire .tc-enq-input::placeholder {
    color: #a8a3b5;
    font-weight: 500;
}
#pane-enquire textarea.tc-enq-input {
    line-height: 1.55;
    resize: vertical;
    min-height: 80px;
}
#pane-enquire .tc-enq-row {
    display: flex;
    gap: 12px;
}
#pane-enquire .tc-enq-row > * {
    flex: 1;
    min-width: 0;
}

/* intlTelInput inside enquiry form */
#pane-enquire .iti {
    width: 100%;
}
#pane-enquire .iti .tc-enq-input {
    padding-left: 52px;
}
#pane-enquire .iti__flag-container {
    border-radius: 8px 0 0 8px;
}

/* Submit button — full-width theme-btn already styled by main.css */
#pane-enquire .tc-enq-submit {
    margin-top: 8px;
}

/* Success/Error alert styling */
#pane-enquire .tc-enq-alert {
    border-radius: 10px;
    padding: 12px 16px;
    font-size: 13px;
    font-weight: 600;
    font-family: "Nunito", sans-serif;
    line-height: 1.5;
    margin-bottom: 16px;
}
#pane-enquire .tc-enq-alert--success {
    background: rgba(39, 174, 96, 0.1);
    color: #1e8449;
    border: 1px solid rgba(39, 174, 96, 0.2);
}
#pane-enquire .tc-enq-alert--danger {
    background: rgba(231, 76, 60, 0.08);
    color: #c0392b;
    border: 1px solid rgba(231, 76, 60, 0.18);
}
#pane-enquire .tc-enq-alert--warning {
    background: rgba(243, 156, 18, 0.1);
    color: #b7791f;
    border: 1px solid rgba(243, 156, 18, 0.2);
}

/* Spinner inside submit button */
#pane-enquire .tc-enq-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,0.35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: tcEnqSpin 0.6s linear infinite;
    vertical-align: middle;
    margin-right: 8px;
}
@keyframes tcEnqSpin {
    to { transform: rotate(360deg); }
}

/* --- Mobile Bottom App Bar --- */
.tc-mb-bar {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1040;
    background: #fff;
    box-shadow: 0 -3px 20px rgba(0, 0, 0, 0.1);
    padding: 12px 16px;
    padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    align-items: center;
    gap: 14px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    background: rgba(255, 255, 255, 0.96);
}
.tc-mb-bar__price {
    flex: 1;
    min-width: 0;
}
.tc-mb-bar__amount {
    font-family: "Nunito", sans-serif;
    font-size: 19px;
    font-weight: 800;
    color: var(--header, #151415);
    line-height: 1.15;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.tc-mb-bar__label {
    font-family: "Nunito", sans-serif;
    font-size: 11px;
    font-weight: 600;
    color: #8e8aa0;
    letter-spacing: 0.3px;
}
.tc-mb-bar__actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}
.tc-mb-bar__btn {
    font-family: "Nunito", sans-serif;
    padding: 11px 20px;
    font-size: 14px;
    font-weight: 800;
    border-radius: 72px;
    border: none;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.25s ease;
    line-height: 1;
    letter-spacing: 0.2px;
}
.tc-mb-bar__btn--enquire {
    background: transparent;
    border: 2px solid var(--theme-color, #4d40ca);
    color: var(--theme-color, #4d40ca);
}
.tc-mb-bar__btn--enquire:active {
    background: rgba(77, 64, 202, 0.08);
}
.tc-mb-bar__btn--book {
    background: var(--theme-color, #4d40ca);
    color: #fff;
    border: 2px solid var(--theme-color, #4d40ca);
}
.tc-mb-bar__btn--book:active {
    opacity: 0.85;
}

/* ===================================================================
   BOTTOM-SHEET DRAWER
   =================================================================== */

/* --- Hide on desktop --- */
.tc-drawer-backdrop,
.tc-drawer {
    display: none;
}

/* --- Drawer Backdrop --- */
.tc-drawer-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1050;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s ease, visibility 0.35s ease;
}
.tc-drawer-backdrop.is-visible {
    opacity: 1;
    visibility: visible;
}

/* --- Drawer Shell --- */
.tc-drawer {
    --drawer-accent: #4D40CA;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1060;
    background: #fff;
    border-radius: 20px 20px 0 0;
    max-height: 92vh;
    transform: translateY(100%);
    transition: transform 0.45s cubic-bezier(0.32, 0.72, 0, 1);
    display: flex;
    flex-direction: column;
    box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.15);
    will-change: transform;
}
.tc-drawer.is-visible {
    transform: translateY(0);
}
.tc-drawer.is-dragging {
    transition: none !important;
}

/* --- Drag Handle --- */
.tc-drawer__handle {
    display: flex;
    justify-content: center;
    padding: 12px 0 4px;
    cursor: grab;
    -webkit-user-select: none;
    user-select: none;
    flex-shrink: 0;
}
.tc-drawer__handle span {
    width: 36px;
    height: 4px;
    border-radius: 2px;
    background: #d0d0d0;
}

/* --- Context Card --- */
.tc-drawer__context {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 20px 12px;
    border-bottom: 1px solid #f0f0f0;
    flex-shrink: 0;
}
.tc-drawer__thumb {
    width: 52px;
    height: 52px;
    border-radius: 10px;
    object-fit: cover;
    flex-shrink: 0;
}
.tc-drawer__meta {
    flex: 1;
    min-width: 0;
}
.tc-drawer__pkg-title {
    font-family: "Nunito", sans-serif;
    font-size: 14px;
    font-weight: 800;
    color: #1a1a2e;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.tc-drawer__pkg-price {
    font-family: "Nunito", sans-serif;
    font-size: 13px;
    font-weight: 700;
    color: var(--drawer-accent);
    margin-top: 2px;
}
.tc-drawer__pkg-price span {
    font-weight: 600;
    color: #8e8aa0;
    font-size: 11px;
}
.tc-drawer__close {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: none;
    background: #f5f5f5;
    color: #666;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.2s;
}
.tc-drawer__close:active {
    background: #e8e8e8;
}

/* --- Header --- */
.tc-drawer__header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 20px 8px;
    flex-shrink: 0;
}
.tc-drawer__header-icon {
    font-size: 18px;
    color: var(--drawer-accent);
}
.tc-drawer__header-title {
    font-family: "Nunito", sans-serif;
    font-size: 18px;
    font-weight: 800;
    color: #1a1a2e;
}

/* --- Scrollable Body --- */
.tc-drawer__body {
    flex: 1;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    padding: 4px 20px 20px;
    min-height: 0;
}

/* --- Form Fields --- */
.tc-drawer__field {
    margin-bottom: 16px;
}
.tc-drawer__label {
    display: block;
    font-family: "Nunito", sans-serif;
    font-size: 13px;
    font-weight: 800;
    color: #455151;
    margin-bottom: 6px;
}
.tc-drawer__label .text-danger {
    color: #e74c3c;
    margin-left: 2px;
}
.tc-drawer__input {
    width: 100%;
    outline: none;
    border: 1.5px solid #e5e5e5;
    padding: 12px 14px;
    color: #1a1a2e;
    background: #fafafa;
    font-family: "Nunito", sans-serif;
    font-size: 15px;
    font-weight: 600;
    border-radius: 12px;
    line-height: 1.2;
    transition: border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
    -webkit-appearance: none;
}
.tc-drawer__input:focus {
    border-color: var(--drawer-accent);
    box-shadow: 0 0 0 3px rgba(77, 64, 202, 0.08);
    background: #fff;
    outline: none;
}
.tc-drawer__input::placeholder {
    color: #b0adc0;
    font-weight: 500;
}
.tc-drawer__input--error {
    border-color: #e74c3c !important;
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.1) !important;
    animation: tcDrawerShake 0.4s ease;
}
@keyframes tcDrawerShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-4px); }
    75% { transform: translateX(4px); }
}
textarea.tc-drawer__input {
    line-height: 1.5;
    resize: vertical;
    min-height: 80px;
}
.tc-drawer__input-wrap {
    position: relative;
}
.tc-drawer__input-wrap .tc-drawer__input {
    padding-right: 40px;
}
.tc-drawer__input-icon {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #b0adc0;
    font-size: 14px;
    pointer-events: none;
}
.tc-drawer__row {
    display: flex;
    gap: 12px;
}
.tc-drawer__row > * {
    flex: 1;
    min-width: 0;
}

/* intlTelInput inside drawer */
.tc-drawer .iti {
    width: 100%;
}
.tc-drawer .iti .tc-drawer__input {
    padding-left: 52px;
}
.tc-drawer .iti__flag-container {
    border-radius: 12px 0 0 12px;
}

/* --- Time Slots --- */
.tc-drawer__slots {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.tc-drawer__slot {
    display: block;
    cursor: pointer;
}
.tc-drawer__slot input {
    display: none;
}
.tc-drawer__slot span {
    display: block;
    padding: 8px 16px;
    border-radius: 20px;
    border: 1.5px solid #e5e5e5;
    background: #fafafa;
    font-family: "Nunito", sans-serif;
    font-size: 13px;
    font-weight: 700;
    color: #455151;
    transition: all 0.2s ease;
}
.tc-drawer__slot input:checked + span {
    border-color: var(--drawer-accent);
    background: rgba(16, 185, 129, 0.08);
    color: var(--drawer-accent);
}

/* --- Travelers / Quantity --- */
.tc-drawer__travelers {
    background: #fafafa;
    border-radius: 14px;
    border: 1.5px solid #e5e5e5;
    padding: 4px 0;
}
.tc-drawer__traveler-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
}
.tc-drawer__traveler-row + .tc-drawer__traveler-row {
    border-top: 1px solid #efefef;
}
.tc-drawer__traveler-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.tc-drawer__traveler-type {
    font-family: "Nunito", sans-serif;
    font-size: 14px;
    font-weight: 800;
    color: #1a1a2e;
}
.tc-drawer__traveler-price {
    font-family: "Nunito", sans-serif;
    font-size: 12px;
    font-weight: 600;
    color: #8e8aa0;
}
.tc-drawer__qty {
    display: flex;
    align-items: center;
    gap: 0;
}
.tc-drawer__qty-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1.5px solid #ddd;
    background: #fff;
    color: #455151;
    font-size: 18px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s ease;
    -webkit-user-select: none;
    user-select: none;
    line-height: 1;
}
.tc-drawer__qty-btn:active {
    background: #f0f0f0;
    transform: scale(0.92);
}
.tc-drawer__qty-val {
    width: 40px;
    text-align: center;
    font-family: "Nunito", sans-serif;
    font-size: 16px;
    font-weight: 800;
    color: #1a1a2e;
}
.tc-drawer__traveler-error {
    padding: 8px 16px;
    font-family: "Nunito", sans-serif;
    font-size: 12px;
    font-weight: 600;
    color: #e74c3c;
}

/* --- Price Breakdown Card --- */
.tc-drawer__price-card {
    background: #f8f8fc;
    border-radius: 14px;
    padding: 14px 16px;
    margin-top: 4px;
    margin-bottom: 12px;
}
.tc-drawer__price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    font-family: "Nunito", sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: #666;
}
.tc-drawer__price-row--discount span:last-child {
    color: #10B981;
    font-weight: 700;
}
.tc-drawer__price-row--total {
    border-top: 1.5px solid #e5e5e5;
    margin-top: 6px;
    padding-top: 10px;
    font-size: 16px;
    font-weight: 800;
    color: #1a1a2e;
}

/* --- Trust Signals --- */
.tc-drawer__trust {
    display: flex;
    justify-content: center;
    gap: 20px;
    padding: 12px 0 4px;
}
.tc-drawer__trust span {
    font-family: "Nunito", sans-serif;
    font-size: 11px;
    font-weight: 700;
    color: #8e8aa0;
    display: flex;
    align-items: center;
    gap: 5px;
}
.tc-drawer__trust span i {
    font-size: 12px;
    color: var(--drawer-accent);
}
.tc-drawer__trust--green span i {
    color: #10B981;
}

/* --- Alert (Drawer) --- */
.tc-drawer__alert {
    border-radius: 10px;
    padding: 12px 14px;
    font-size: 13px;
    font-weight: 600;
    font-family: "Nunito", sans-serif;
    line-height: 1.5;
    margin-bottom: 14px;
}
.tc-drawer__alert--success {
    background: rgba(39, 174, 96, 0.1);
    color: #1e8449;
    border: 1px solid rgba(39, 174, 96, 0.2);
}
.tc-drawer__alert--danger {
    background: rgba(231, 76, 60, 0.08);
    color: #c0392b;
    border: 1px solid rgba(231, 76, 60, 0.18);
}
.tc-drawer__alert--warning {
    background: rgba(243, 156, 18, 0.1);
    color: #b7791f;
    border: 1px solid rgba(243, 156, 18, 0.2);
}

/* --- Sticky Footer --- */
.tc-drawer__footer {
    padding: 12px 20px;
    padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid #f0f0f0;
    background: #fff;
    flex-shrink: 0;
    position: relative;
}
.tc-drawer__footer::before {
    content: '';
    position: absolute;
    top: -24px;
    left: 0;
    right: 0;
    height: 24px;
    background: linear-gradient(to top, #fff, transparent);
    pointer-events: none;
}
.tc-drawer__submit {
    width: 100%;
    padding: 15px 24px;
    border: none;
    border-radius: 14px;
    background: var(--drawer-accent);
    color: #fff;
    font-family: "Nunito", sans-serif;
    font-size: 16px;
    font-weight: 800;
    letter-spacing: 0.3px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: opacity 0.2s ease, transform 0.15s ease;
}
.tc-drawer__submit:active {
    opacity: 0.88;
    transform: scale(0.98);
}
.tc-drawer__submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Spinner for submit */
.tc-drawer__spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2.5px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: tcEnqSpin 0.6s linear infinite;
    vertical-align: middle;
}

/* ===================================================================
   RESPONSIVE
   =================================================================== */

/* Show mobile bar + drawer on <992px (matches sidebar d-none d-lg-block) */
@media (max-width: 991.98px) {
    .tc-mb-bar {
        display: flex;
    }
    .tc-drawer-backdrop,
    .tc-drawer {
        display: flex;
    }
    .tc-drawer {
        display: flex;
    }
    body.has-mobile-bar {
        padding-bottom: calc(76px + env(safe-area-inset-bottom, 0px));
    }
}

@media (max-width: 767.98px) {
    /* Compact sidebar padding on mobile (still applies if sidebar visible elsewhere) */
    .tour-details-wrapper .tour-details-sidebar .tour-sidebar-items {
        padding: 24px 20px;
    }
    .tc-booking-tabs .nav-link {
        padding: 14px 8px 12px;
        font-size: 14px;
    }
}

@media (max-width: 400px) {
    .tc-mb-bar__btn {
        padding: 10px 14px;
        font-size: 13px;
    }
    .tc-mb-bar__amount {
        font-size: 17px;
    }
    .tc-drawer__submit {
        font-size: 15px;
        padding: 14px 20px;
    }
}

/* --- Reduced motion --- */
@media (prefers-reduced-motion: reduce) {
    .tc-drawer {
        transition: transform 0.15s ease !important;
    }
    .tc-drawer-backdrop {
        transition: opacity 0.15s ease, visibility 0.15s ease !important;
    }
    .tc-drawer__submit,
    .tc-drawer__qty-btn,
    .tc-drawer__input {
        transition: none !important;
    }
}
