/* Tours Grenada - AI Concierge Fullscreen Layout Stylesheet */

:root {
    --tai-primary: #1d6e7c;
    --tai-primary-hover: #155560;
    --tai-accent: #55a7b5;
    --tai-accent-light: #e8f5f7;
    --tai-bg: #f4f7f9;
    --tai-card-bg: #ffffff;
    --tai-border: #e3ebef;
    --tai-text: #2c3e50;
    --tai-muted: #6c7a89;
    --tai-success: #28a745;
}

/* =========================================================
   SCOPED PAGE LAYOUT: ONLY APPLIES TO TOUR AI PAGE
   ========================================================= */

body.tour-ai-fullscreen-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: #edf3f5;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    overflow-y: auto;
}

body.admin-bar.tour-ai-fullscreen-page {
    min-height: calc(100vh - 32px);
}

@media screen and (max-width: 782px) {
    body.admin-bar.tour-ai-fullscreen-page {
        min-height: calc(100vh - 46px);
    }
}

/* Ensure footer sticks cleanly at bottom of viewport if content is short */
body.tour-ai-fullscreen-page footer.footer-dark {
    margin-top: auto;
    width: 100%;
}

body.tour-ai-fullscreen-page .bottom-bar {
    width: 100%;
}

/* =========================================================
   CHATBOT FULL-VIEWPORT FLEX CONTAINER
   ========================================================= */

.tour-ai-container {
    max-width: 1100px;
    width: 100%;
    margin: 20px auto 44px auto;
    padding: 0 20px;
    box-sizing: border-box;
    height: calc(100vh - 120px);
    min-height: 600px;
    max-height: 900px;
    display: flex;
    flex-direction: column;
}

@media (max-width: 991px) {
    .tour-ai-container {
        margin: 16px auto 32px auto;
        padding: 0 14px;
        height: calc(100vh - 100px);
        min-height: 540px;
    }
}

@media (max-width: 576px) {
    .tour-ai-container {
        margin: 10px auto 24px auto;
        padding: 0 10px;
        height: calc(100vh - 80px);
        min-height: 500px;
    }
}

.tour-ai-card {
    background: var(--tai-card-bg);
    border-radius: 18px;
    box-shadow: 0 12px 35px rgba(29, 110, 124, 0.1), 0 3px 10px rgba(0, 0, 0, 0.03);
    border: 1px solid var(--tai-border);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    height: 100%;
}

/* Chat Header */
.tour-ai-header {
    background: linear-gradient(135deg, #17545e 0%, #1d6e7c 40%, #55a7b5 100%);
    color: #ffffff;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    flex-shrink: 0;
}

.tour-ai-avatar-header {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.3);
    position: relative;
}

.tour-ai-status-pulse {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 10px;
    height: 10px;
    background: #00e676;
    border: 2px solid #ffffff;
    border-radius: 50%;
    box-shadow: 0 0 8px rgba(0, 230, 118, 0.8);
}

.tour-ai-title {
    font-size: 1.08rem;
    font-weight: 700;
    margin-bottom: 1px;
    letter-spacing: -0.2px;
}

.tour-ai-subtitle {
    font-size: 0.8rem;
    opacity: 0.92;
    display: flex;
    align-items: center;
    gap: 6px;
}

.tour-ai-reset-btn {
    background: rgba(255, 255, 255, 0.18);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 30px;
    padding: 5px 12px;
    font-size: 0.78rem;
    font-weight: 500;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 5px;
}

.tour-ai-reset-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    color: #ffffff;
    transform: translateY(-1px);
}

/* Chat Messages Stream - SCROLLS INTERNALLY */
.tour-ai-messages-wrap {
    flex: 1 !important;
    height: auto !important;
    min-height: 0 !important;
    overflow-y: auto !important;
    overscroll-behavior: contain;
    background: var(--tai-bg);
    padding: 20px 20px 36px 20px;
    scroll-behavior: smooth;
    position: relative;
}

.tour-ai-messages-wrap::-webkit-scrollbar {
    width: 6px;
}
.tour-ai-messages-wrap::-webkit-scrollbar-track {
    background: transparent;
}
.tour-ai-messages-wrap::-webkit-scrollbar-thumb {
    background: #cbd8dc;
    border-radius: 10px;
}
.tour-ai-messages-wrap::-webkit-scrollbar-thumb:hover {
    background: #aabdc3;
}

/* Pagination: Load More */
.tour-ai-load-more-wrap {
    text-align: center;
    margin-bottom: 16px;
}

.tour-ai-load-more-btn {
    background: #ffffff;
    border: 1px solid var(--tai-border);
    color: var(--tai-primary);
    font-size: 0.78rem;
    font-weight: 600;
    padding: 5px 14px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

.tour-ai-load-more-btn:hover {
    background: var(--tai-accent-light);
    border-color: var(--tai-accent);
}

/* Message Bubbles */
.tour-ai-msg-row {
    display: flex;
    margin-bottom: 16px;
    animation: fadeInMsg 0.25s ease-out forwards;
}

@keyframes fadeInMsg {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

.tour-ai-user-row {
    justify-content: flex-end;
}

.tour-ai-ai-row {
    justify-content: flex-start;
}

.tour-ai-avatar-msg {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--tai-accent);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    margin-right: 10px;
    flex-shrink: 0;
    box-shadow: 0 2px 6px rgba(85, 167, 181, 0.35);
}

.tour-ai-bubble-user {
    background: linear-gradient(135deg, #1d6e7c 0%, #2f8e9d 100%);
    color: #ffffff;
    padding: 10px 16px;
    border-radius: 16px 16px 4px 16px;
    max-width: 82%;
    font-size: 0.92rem;
    line-height: 1.5;
    box-shadow: 0 3px 10px rgba(29, 110, 124, 0.18);
    overflow-wrap: break-word;
    word-break: normal;
    hyphens: auto;
}

.tour-ai-bubble-ai {
    background: #ffffff;
    color: var(--tai-text);
    padding: 14px 18px;
    border-radius: 16px 16px 16px 4px;
    max-width: 85%;
    font-size: 0.92rem;
    line-height: 1.58;
    border: 1px solid #e8eef1;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.03);
    overflow-wrap: break-word;
    word-break: normal;
    hyphens: auto;
}

/* Markdown styling inside AI bubble */
.tour-ai-message-text {
    overflow-wrap: break-word;
    word-break: normal;
}

.tour-ai-message-text p {
    margin-bottom: 8px;
}
.tour-ai-message-text p:last-child {
    margin-bottom: 0;
}
.tour-ai-message-text ul, .tour-ai-message-text ol {
    margin-bottom: 10px;
    padding-left: 18px;
}
.tour-ai-message-text li {
    margin-bottom: 4px;
}
.tour-ai-message-text strong {
    color: #11343b;
    font-weight: 600;
}
.tour-ai-message-text hr {
    border-top: 1px solid #e1ebef;
    margin: 12px 0;
}

/* Prevent unwanted fragmentation of prices, dates, times, currencies, and references */
.tour-ai-price-no-wrap,
.tour-ai-nowrap,
.tour-ai-message-text .tour-ai-price,
.tour-ai-price-row strong,
.tour-ai-price-row span:last-child,
.tour-ai-conf-price-row strong,
.tour-ai-conf-price-row span:last-child,
.tour-ai-conf-price-row .final-price,
.tour-ai-service-price-badge {
    white-space: nowrap !important;
    display: inline-block;
}

/* Primary Action & Stripe Payment Link Styling */
.tour-ai-message-text a {
    color: var(--tai-primary);
    text-decoration: underline;
    font-weight: 600;
    transition: all 0.2s;
}

.tour-ai-message-text a[href*="checkout.stripe.com"] {
    display: inline-block;
    background: linear-gradient(135deg, #635bff 0%, #4338ca 100%);
    color: #ffffff !important;
    text-decoration: none !important;
    padding: 10px 20px;
    border-radius: 30px;
    font-weight: 600;
    font-size: 0.92rem;
    margin: 8px 0 4px 0;
    box-shadow: 0 4px 14px rgba(99, 91, 255, 0.35);
    transition: all 0.25s ease;
}

.tour-ai-message-text a[href*="checkout.stripe.com"]:hover {
    background: linear-gradient(135deg, #4f46e5 0%, #3730a3 100%);
    box-shadow: 0 6px 18px rgba(99, 91, 255, 0.45);
    transform: translateY(-2px);
    color: #ffffff !important;
}

/* Animated Typing Indicator */
.tour-ai-typing-indicator {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 2px;
}

.tour-ai-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background-color: var(--tai-accent);
    display: inline-block;
    animation: taiBounce 1.4s infinite ease-in-out both;
}

.tour-ai-dot:nth-child(1) { animation-delay: -0.32s; }
.tour-ai-dot:nth-child(2) { animation-delay: -0.16s; }
.tour-ai-dot:nth-child(3) { animation-delay: 0s; }

@keyframes taiBounce {
    0%, 80%, 100% { transform: scale(0); opacity: 0.4; }
    40% { transform: scale(1); opacity: 1; }
}

/* Quick Suggestion Chips */
.tour-ai-chips-wrap {
    padding: 8px 18px 4px 18px;
    background: #ffffff;
    border-top: 1px solid #f0f4f6;
    display: flex;
    gap: 8px;
    overflow-x: auto;
    white-space: nowrap;
    scrollbar-width: none;
    flex-shrink: 0;
}
.tour-ai-chips-wrap::-webkit-scrollbar {
    display: none;
}

.tour-ai-chip {
    background: var(--tai-accent-light);
    color: var(--tai-primary);
    border: 1px solid rgba(85, 167, 181, 0.3);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
    flex-shrink: 0;
}

.tour-ai-chip:hover {
    background: var(--tai-accent);
    color: #ffffff;
    border-color: var(--tai-accent);
    transform: translateY(-1px);
}

/* Chat Input Bar - DOCKED AT BOTTOM */
.tour-ai-footer {
    background: #ffffff;
    padding: 10px 18px 12px 18px;
    border-top: 1px solid var(--tai-border);
    flex-shrink: 0;
}

.tour-ai-input-box {
    display: flex;
    align-items: flex-end;
    background: #f8fafb;
    border: 1.5px solid #dbe5e8;
    border-radius: 22px;
    padding: 4px 6px 4px 16px;
    transition: all 0.25s ease;
}

.tour-ai-input-box:focus-within {
    background: #ffffff;
    border-color: var(--tai-accent);
    box-shadow: 0 0 0 3px rgba(85, 167, 181, 0.15);
}

.tour-ai-input-box.locked {
    background: #f1f4f6;
    border-color: #cbd8dc;
    opacity: 0.85;
    cursor: not-allowed;
}

.tour-ai-input-field {
    border: none;
    background: transparent;
    outline: none;
    width: 100%;
    font-size: 0.92rem;
    color: var(--tai-text);
    padding: 8px 8px 8px 0;
    resize: none;
    min-height: 24px;
    max-height: 140px;
    line-height: 1.45;
    font-family: inherit;
    box-sizing: border-box;
    overflow-y: auto;
}

.tour-ai-input-field::-webkit-scrollbar {
    width: 4px;
}

.tour-ai-input-field::-webkit-scrollbar-thumb {
    background: #cbd8dc;
    border-radius: 4px;
}

.tour-ai-input-field:disabled {
    cursor: not-allowed;
    color: var(--tai-muted);
}

.tour-ai-send-btn {
    background: linear-gradient(135deg, var(--tai-primary) 0%, var(--tai-accent) 100%);
    color: #ffffff;
    border: none;
    border-radius: 50%;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
    box-shadow: 0 2px 6px rgba(29, 110, 124, 0.25);
    margin-bottom: 2px;
}

.tour-ai-send-btn:hover:not(:disabled) {
    transform: scale(1.05);
    box-shadow: 0 4px 10px rgba(29, 110, 124, 0.35);
}

.tour-ai-send-btn:disabled {
    background: #c3cfd3;
    box-shadow: none;
    cursor: not-allowed;
    transform: none;
}

.tour-ai-badge-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    font-size: 0.74rem;
    color: var(--tai-muted);
    margin-top: 8px;
}

/* Spinner */
.tour-ai-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #ffffff;
    animation: taiSpin 0.8s ease-in-out infinite;
}

@keyframes taiSpin {
    to { transform: rotate(360deg); }
}

/* Toast error notification */
.tour-ai-toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: #d9534f;
    color: #ffffff;
    padding: 10px 18px;
    border-radius: 12px;
    font-size: 0.85rem;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    z-index: 9999;
    display: flex;
    align-items: center;
    gap: 8px;
    animation: fadeInToast 0.3s ease;
}

@keyframes fadeInToast {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .tour-ai-container {
        padding: 6px 8px 8px 8px !important;
    }
    .tour-ai-card {
        border-radius: 12px;
    }
    .tour-ai-header {
        padding: 10px 14px;
    }
    .tour-ai-messages-wrap {
        padding: 12px 14px;
    }
}

/* =========================================================
   INTERACTIVE CLICKABLE ACTION BUTTONS & INLINE FORMS
   ========================================================= */

/* Action Button Base */
.tour-ai-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: inherit;
    font-size: 0.86rem;
    font-weight: 600;
    line-height: 1.3;
    padding: 7px 15px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    margin: 5px 6px 5px 0;
    user-select: auto;
    vertical-align: middle;
}

/* Select Tour Button */
.tour-ai-btn-select_tour {
    background: #ffffff;
    color: var(--tai-primary);
    border: 1.5px solid var(--tai-primary);
    box-shadow: 0 2px 6px rgba(29, 110, 124, 0.08);
}

.tour-ai-btn-select_tour:hover:not(:disabled) {
    background: var(--tai-primary);
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(29, 110, 124, 0.22);
}

/* Select Date Pill */
.tour-ai-btn-select_date {
    background: #eef7f9;
    color: var(--tai-primary);
    border: 1.5px solid #a8d5de;
    border-radius: 18px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.tour-ai-btn-select_date:hover:not(:disabled) {
    background: var(--tai-primary);
    color: #ffffff;
    border-color: var(--tai-primary);
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(29, 110, 124, 0.2);
}

/* Select Boat Pill */
.tour-ai-btn-select_boat {
    background: #ffffff;
    color: #2b6cb0;
    border: 1.5px solid #b2d5f1;
    border-radius: 18px;
}

.tour-ai-btn-select_boat:hover:not(:disabled) {
    background: #2b6cb0;
    color: #ffffff;
    border-color: #2b6cb0;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(43, 108, 176, 0.2);
}

/* Action Button Selected State */
.tour-ai-action-btn.selected {
    background: #0d9488 !important;
    color: #ffffff !important;
    border-color: #0d9488 !important;
    box-shadow: 0 2px 8px rgba(13, 148, 136, 0.35) !important;
    pointer-events: none !important;
    cursor: default !important;
    transform: none !important;
    opacity: 1 !important;
}

/* Action Button Dimmed / Inactive State */
.tour-ai-action-btn.dimmed,
.tour-ai-action-btn.past-step-disabled:not(.selected),
.tour-ai-action-btn:disabled:not(.selected) {
    opacity: 0.4 !important;
    cursor: not-allowed !important;
    pointer-events: none !important;
    transform: none !important;
    box-shadow: none !important;
    background: #f1f5f9 !important;
    color: #94a3b8 !important;
    border-color: #cbd5e1 !important;
}

.tour-ai-action-btn:disabled:not(.selected) {
    pointer-events: none !important;
    cursor: not-allowed !important;
}

.tour-ai-action-btn:disabled.selected {
    pointer-events: none !important;
    cursor: default !important;
}

/* =========================================================
   INLINE BOOKING DETAILS FORM CARD (TYPABLE)
   ========================================================= */

.tour-ai-inline-form-card {
    background: #ffffff;
    border: 1.5px solid #cce2e7;
    border-radius: 14px;
    padding: 16px 18px;
    margin: 14px 0 6px 0;
    box-shadow: 0 4px 14px rgba(29, 110, 124, 0.08);
}

.tour-ai-form-header {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--tai-primary);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #eef3f5;
    padding-bottom: 8px;
}

.tour-ai-header-title {
    display: flex;
    align-items: center;
}

.tour-ai-header-badge {
    font-size: 0.72rem;
    font-weight: 600;
    color: #1d6e7c;
    background: #eaf4f6;
    padding: 3px 8px;
    border-radius: 12px;
}

.tour-ai-form-step-sec {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px dashed #dbe5e8;
}

.tour-ai-form-step-sec:first-of-type {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}

.tour-ai-step-title {
    font-size: 0.84rem;
    font-weight: 700;
    color: #2c444e;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tour-ai-step-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--tai-primary);
    color: #ffffff;
    font-size: 0.72rem;
    font-weight: 700;
}

.tour-ai-step-hint {
    font-size: 0.72rem;
    color: #718096;
    margin-top: 4px;
    font-style: italic;
}

.tour-ai-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px 14px;
}

.tour-ai-grid-3 {
    grid-template-columns: 1fr 1fr 1fr;
}

@media (max-width: 600px) {
    .tour-ai-form-grid,
    .tour-ai-grid-3 {
        grid-template-columns: 1fr !important;
    }
}

/* Coupon Row & Apply Button */
.tour-ai-coupon-row {
    margin-bottom: 12px;
}

.tour-ai-coupon-input-wrap {
    display: flex;
    gap: 8px;
}

.tour-ai-coupon-input {
    flex: 1;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.tour-ai-coupon-apply-btn {
    padding: 8px 16px;
    background: var(--tai-accent);
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.tour-ai-coupon-apply-btn:hover:not(:disabled) {
    background: var(--tai-primary);
}

.tour-ai-coupon-msg {
    font-size: 0.78rem;
    font-weight: 600;
    margin-top: 5px;
    padding: 4px 8px;
    border-radius: 6px;
}

.tour-ai-coupon-msg.text-success {
    background: #eafaf1;
    color: #1e7e34;
}

.tour-ai-coupon-msg.text-danger {
    background: #fdf2f2;
    color: #dc3545;
}

/* Live Price Breakdown Card */
.tour-ai-price-details-card {
    background: #f8fafc;
    border: 1px solid #dce8ec;
    border-radius: 10px;
    padding: 12px 14px;
    margin-top: 10px;
}

.tour-ai-price-items-heading {
    font-size: 0.76rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #475569;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
}

.tour-ai-price-items-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.tour-ai-item-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 17px;
    height: 17px;
    border-radius: 50%;
    background: #1d6e7c;
    color: #ffffff;
    font-size: 0.68rem;
    font-weight: 700;
    flex-shrink: 0;
    margin-right: 6px;
}

.tour-ai-price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.82rem;
    color: #4a5568;
    margin-bottom: 6px;
    gap: 8px;
}

.tour-ai-price-row > span:first-child {
    min-width: 0;
    overflow-wrap: break-word;
}

.tour-ai-price-row > strong,
.tour-ai-price-row > span:last-child {
    flex-shrink: 0;
    white-space: nowrap !important;
}

.tour-ai-price-row.tour-ai-addon-row {
    font-size: 0.82rem;
    color: #1e293b;
    padding: 4px 8px;
    border-left: 3px solid #1d6e7c;
    background: #eef7f9;
    border-radius: 0 6px 6px 0;
    margin-bottom: 4px;
    gap: 8px;
}

.tour-ai-price-row.tour-ai-addon-row strong {
    color: #0f766e;
    font-weight: 700;
    flex-shrink: 0;
    white-space: nowrap !important;
}

.tour-ai-addon-title {
    display: flex;
    align-items: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: normal;
    overflow-wrap: break-word;
    word-break: normal;
    margin-right: 4px;
    font-weight: 500;
    min-width: 0;
    flex: 1;
}

.tour-ai-no-services-row {
    font-size: 0.76rem;
    color: #64748b;
    font-style: italic;
    padding: 3px 0 3px 22px;
}

.tour-ai-price-divider {
    height: 1px;
    background: #dce8ec;
    margin: 8px 0;
}

.tour-ai-price-row.tour-ai-subtotal-row {
    font-weight: 600;
    color: #1e293b;
    font-size: 0.88rem;
}

.tour-ai-price-row.tour-ai-total-row {
    font-size: 0.95rem;
    color: #11343b;
    margin-bottom: 0;
}

.tour-ai-price-row.tour-ai-total-row strong {
    color: #1d6e7c;
    font-size: 1.05rem;
}

/* Terms Row */
.tour-ai-terms-row {
    margin-top: 12px;
    background: #fffdf5;
    border: 1px solid #fae8a4;
    border-radius: 8px;
    padding: 10px 12px;
}

.tour-ai-terms-label {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 0.75rem;
    line-height: 1.4;
    color: #5d4a13;
    margin: 0;
    cursor: pointer;
}

.tour-ai-terms-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--tai-primary);
    cursor: pointer;
    margin-top: 2px;
    flex-shrink: 0;
}

.tour-ai-form-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.tour-ai-form-group label {
    font-size: 0.78rem;
    font-weight: 600;
    color: #4a5568;
    margin: 0;
    display: flex;
    align-items: center;
}

.tour-ai-form-input {
    width: 100%;
    padding: 8px 12px;
    border: 1.5px solid #cfdce1;
    border-radius: 8px;
    font-size: 0.88rem;
    outline: none;
    background: #fafbfc;
    color: var(--tai-text);
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.tour-ai-form-input:focus {
    border-color: var(--tai-primary);
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(29, 110, 124, 0.12);
}

.tour-ai-form-input:disabled {
    background: #edf2f4;
    color: #718096;
    cursor: not-allowed;
    border-color: #dbe4e7;
}

.tour-ai-form-textarea {
    resize: vertical;
    min-height: 58px;
    line-height: 1.45;
    font-family: inherit;
}

.tour-ai-phone-input-wrap {
    display: flex;
    align-items: center;
    gap: 6px;
    width: 100%;
}

.tour-ai-phone-country {
    flex: 0 0 135px;
    max-width: 155px;
    padding: 8px 6px;
    border: 1.5px solid #cfdce1;
    border-radius: 8px;
    font-size: 0.82rem;
    font-weight: 500;
    outline: none;
    background: #fafbfc;
    color: var(--tai-text);
    transition: all 0.2s ease;
    cursor: pointer;
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
}

.tour-ai-phone-country:focus {
    border-color: var(--tai-primary);
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(29, 110, 124, 0.12);
}

.tour-ai-phone-country:disabled {
    background: #edf2f4;
    color: #718096;
    cursor: not-allowed;
    border-color: #dbe4e7;
}

.tour-ai-phone-number {
    flex: 1;
    min-width: 0;
}

/* =========================================================
   PAYMENT OPTIONS & EXTRA FIELDS STYLES
   ========================================================= */

.tour-ai-payment-type-wrap {
    display: flex;
    gap: 12px;
    margin-bottom: 10px;
}

.tour-ai-radio-label {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: #f8fafb;
    border: 1.5px solid #dbe5e8;
    border-radius: 10px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    color: #2c444e;
    transition: all 0.2s ease;
    user-select: none;
    margin: 0;
}

.tour-ai-radio-label:hover {
    border-color: var(--tai-accent);
    background: #ffffff;
}

.tour-ai-radio-label input[type="radio"] {
    accent-color: var(--tai-primary);
    width: 17px;
    height: 17px;
    cursor: pointer;
    margin: 0;
}

.tour-ai-radio-label.selected,
.tour-ai-radio-label:has(input:checked) {
    border-color: var(--tai-primary);
    background: #eef7f9;
    color: var(--tai-primary);
    box-shadow: 0 2px 6px rgba(29, 110, 124, 0.12);
}

.tour-ai-partial-details-box {
    background: #f0f7f9;
    border: 1px solid #bce1e8;
    border-radius: 10px;
    padding: 12px 14px;
    margin-top: 8px;
    transition: all 0.2s ease;
}

.tour-ai-percent-selector {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.tour-ai-percent-label {
    font-size: 0.8rem;
    font-weight: 700;
    color: #11343b;
}

.tour-ai-percent-chips {
    display: flex;
    gap: 8px;
}

.tour-ai-percent-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 14px;
    background: #ffffff;
    border: 1.5px solid #9dcad3;
    border-radius: 20px;
    font-size: 0.82rem;
    font-weight: 700;
    color: #1d6e7c;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
    margin: 0;
}

.tour-ai-percent-chip input[type="radio"] {
    display: none;
}

.tour-ai-percent-chip:hover {
    background: #e0f2f5;
    border-color: var(--tai-primary);
}

.tour-ai-percent-chip.active,
.tour-ai-percent-chip:has(input:checked) {
    background: var(--tai-primary);
    color: #ffffff;
    border-color: var(--tai-primary);
    box-shadow: 0 2px 6px rgba(29, 110, 124, 0.25);
}

.tour-ai-partial-note {
    font-size: 0.76rem;
    color: #0f4852;
    line-height: 1.35;
    display: flex;
    align-items: center;
    gap: 4px;
}

.tour-ai-partial-breakdown-box {
    margin-top: 6px;
}

.tour-ai-price-row.tour-ai-deposit-row {
    font-size: 0.9rem;
    color: #0f766e;
    font-weight: 700;
    background: #ecfdf5;
    padding: 6px 10px;
    border-radius: 6px;
    margin-top: 6px;
    border-left: 3px solid #10b981;
}

.tour-ai-price-row.tour-ai-deposit-row strong {
    color: #047857;
    font-size: 1.02rem;
}

.tour-ai-price-row.tour-ai-remaining-row {
    font-size: 0.8rem;
    color: #4b5563;
    padding: 4px 10px;
    margin-top: 4px;
}

.tour-ai-extra-fields-wrap {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* =========================================================
   ADD-ON SERVICES SECTION IN BOOKING FORM
   ========================================================= */

.tour-ai-services-section {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px dashed #dbe5e8;
}

.tour-ai-services-header {
    font-size: 0.84rem;
    font-weight: 700;
    color: #2c444e;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.tour-ai-services-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 6px;
}

.tour-ai-service-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 14px;
    background: #f8fafc;
    border: 1.5px solid #dce8ec;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    user-select: none;
    margin: 0;
    box-sizing: border-box;
    width: 100%;
}

.tour-ai-service-item:hover {
    background: #ffffff;
    border-color: #8ec3cc;
    box-shadow: 0 2px 8px rgba(29, 110, 124, 0.08);
}

.tour-ai-service-item:has(input[type="checkbox"]:checked) {
    background: #eff8fa;
    border-color: var(--tai-primary);
    box-shadow: 0 0 0 1px var(--tai-primary), 0 3px 10px rgba(29, 110, 124, 0.12);
}

.tour-ai-service-main {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    flex: 1;
    min-width: 0;
}

.tour-ai-service-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--tai-primary);
    cursor: pointer;
    flex-shrink: 0;
    margin: 2px 0 0 0;
}

.tour-ai-service-meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.tour-ai-service-name {
    font-size: 0.84rem;
    font-weight: 600;
    color: #1e293b;
    line-height: 1.35;
    word-break: break-word;
}

.tour-ai-service-desc {
    font-size: 0.74rem;
    color: #64748b;
    line-height: 1.3;
}

.tour-ai-service-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.tour-ai-service-qty-wrap {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #ffffff;
    border: 1px solid #c2e2e8;
    border-radius: 6px;
    padding: 2px 6px;
    transition: all 0.2s ease;
}

.tour-ai-service-item:has(input[type="checkbox"]:checked) .tour-ai-service-qty-wrap {
    border-color: var(--tai-primary);
    background: #ffffff;
}

.tour-ai-service-qty-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #64748b;
    user-select: none;
}

.tour-ai-service-qty {
    width: 44px;
    height: 26px;
    padding: 0 4px;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    font-size: 0.82rem;
    font-weight: 600;
    color: #1e293b;
    text-align: center;
    outline: none;
    transition: border-color 0.2s ease;
    background: #ffffff;
}

.tour-ai-service-qty:focus {
    border-color: var(--tai-primary);
    box-shadow: 0 0 0 2px rgba(29, 110, 124, 0.15);
}

.tour-ai-service-qty:disabled {
    background: #f1f5f9;
    color: #94a3b8;
    border-color: #e2e8f0;
    cursor: not-allowed;
    opacity: 0.6;
}

.tour-ai-service-price-badge {
    display: inline-flex;
    align-items: center;
    font-size: 0.78rem;
    font-weight: 700;
    color: #1d6e7c;
    background: #e4f2f5;
    padding: 4px 10px;
    border-radius: 20px;
    white-space: nowrap;
    flex-shrink: 0;
    border: 1px solid #c2e2e8;
    transition: all 0.2s ease;
}

.tour-ai-service-item:has(input[type="checkbox"]:checked) .tour-ai-service-price-badge {
    background: var(--tai-primary);
    color: #ffffff;
    border-color: var(--tai-primary);
}

.tour-ai-btn-add_service,
.tour-ai-btn-select_service {
    background: #f0f7f8;
    color: var(--tai-primary);
    border-color: #bce0e6;
}

.tour-ai-btn-add_service:hover,
.tour-ai-btn-select_service:hover {
    background: var(--tai-primary);
    color: #ffffff;
    border-color: var(--tai-primary);
}

.tour-ai-form-actions {
    margin-top: 14px;
}

.tour-ai-form-submit-btn {
    width: 100%;
    padding: 10px 18px;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--tai-primary) 0%, var(--tai-accent) 100%);
    color: #ffffff;
    font-weight: 700;
    font-size: 0.92rem;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 3px 8px rgba(29, 110, 124, 0.25);
}

.tour-ai-form-submit-btn:hover:not(:disabled) {
    opacity: 0.95;
    transform: translateY(-1px);
    box-shadow: 0 5px 14px rgba(29, 110, 124, 0.35);
}

.tour-ai-form-submit-btn.submitted {
    background: #28a745 !important;
    box-shadow: none !important;
    cursor: default !important;
    opacity: 1 !important;
}

.tour-ai-form-submit-btn:disabled:not(.submitted) {
    opacity: 0.65;
    cursor: not-allowed;
    transform: none;
}

.tour-ai-capacity-error {
    margin-top: 8px;
    padding: 8px 12px;
    background-color: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
    border-radius: 6px;
    font-size: 0.82rem;
    font-weight: 600;
    line-height: 1.35;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* =========================================================
   PAYMENT CHECKOUT BUTTON
   ========================================================= */

.tour-ai-payment-btn {
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    padding: 11px 22px !important;
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%) !important;
    color: #ffffff !important;
    font-weight: 700 !important;
    font-size: 0.96rem !important;
    border-radius: 28px !important;
    text-decoration: none !important;
    box-shadow: 0 4px 14px rgba(40, 167, 69, 0.35) !important;
    margin: 10px 0 !important;
    transition: all 0.2s ease !important;
}

.tour-ai-payment-btn:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 18px rgba(40, 167, 69, 0.45) !important;
    color: #ffffff !important;
}

/* =========================================================
   LUXURY BOOKING CONFIRMATION & RECEIPT CARD
   ========================================================= */

.tour-ai-confirmation-card {
    background: #ffffff;
    border: 1.5px solid #d4e8eb;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(29, 110, 124, 0.08), 0 2px 6px rgba(0, 0, 0, 0.04);
    margin: 16px 0;
    overflow: hidden;
    font-family: inherit;
    transition: all 0.3s ease;
}

.tour-ai-confirmation-card:hover {
    box-shadow: 0 14px 38px rgba(29, 110, 124, 0.12), 0 3px 8px rgba(0, 0, 0, 0.05);
    border-color: var(--tai-accent);
}

.tour-ai-conf-header {
    background: linear-gradient(135deg, #1d6e7c 0%, #2a8e9e 100%);
    color: #ffffff;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}

.tour-ai-conf-ref {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.3px;
}

.tour-ai-conf-ref i {
    font-size: 1.15rem;
    color: #a8edf4;
}

.tour-ai-conf-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.35);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 600;
    color: #ffffff;
    backdrop-filter: blur(4px);
}

.tour-ai-pulse-dot {
    width: 8px;
    height: 8px;
    background-color: #2ecc71;
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 0 0 0 rgba(46, 204, 113, 0.7);
    animation: taiPulse 2s infinite;
}

@keyframes taiPulse {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(46, 204, 113, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(46, 204, 113, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(46, 204, 113, 0); }
}

.tour-ai-conf-body {
    padding: 20px;
}

.tour-ai-conf-tour-title {
    margin: 0 0 16px 0;
    font-size: 1.16rem;
    font-weight: 800;
    color: #1a4d55;
    line-height: 1.35;
    display: flex;
    align-items: center;
}

.tour-ai-conf-tour-title i {
    color: var(--tai-accent);
    flex-shrink: 0;
}

.tour-ai-conf-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 16px;
}

@media (max-width: 600px) {
    .tour-ai-conf-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
}

.tour-ai-conf-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: #f8fafb;
    border: 1px solid #edf3f5;
    border-radius: 10px;
    padding: 10px 14px;
    transition: background 0.2s ease;
}

.tour-ai-conf-item:hover {
    background: #f1f7f9;
}

.tour-ai-conf-icon {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: rgba(85, 167, 181, 0.15);
    color: #1d6e7c;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
    flex-shrink: 0;
}

.tour-ai-conf-data {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.tour-ai-conf-label {
    font-size: 0.72rem;
    text-transform: uppercase;
    font-weight: 700;
    color: #7b9196;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
}

.tour-ai-conf-val {
    font-size: 0.88rem;
    color: #2c3e50;
    font-weight: 600;
    line-height: 1.3;
    word-break: break-word;
}

/* Add-on services pills */
.tour-ai-conf-services {
    margin-bottom: 16px;
    background: #fbfdfd;
    border: 1px dashed #d5e5e8;
    border-radius: 10px;
    padding: 12px 14px;
}

.tour-ai-conf-sec-heading {
    font-size: 0.75rem;
    text-transform: uppercase;
    font-weight: 700;
    color: #557980;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
}

.tour-ai-conf-services-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tour-ai-conf-service-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #eef7f9;
    color: #1d6e7c;
    border: 1px solid #d0e7ec;
    border-radius: 20px;
    padding: 4px 12px;
    font-size: 0.82rem;
    font-weight: 600;
}

.tour-ai-conf-service-tag i {
    color: var(--tai-accent);
}

/* Pricing Breakdown */
.tour-ai-conf-pricing-box {
    background: #f9fbfc;
    border: 1.5px solid #e3edf0;
    border-radius: 12px;
    padding: 14px 18px;
    margin-bottom: 18px;
}

.tour-ai-conf-price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.88rem;
    color: #4b656b;
    margin-bottom: 6px;
    gap: 8px;
}

.tour-ai-conf-price-row > span:first-child {
    min-width: 0;
    overflow-wrap: break-word;
}

.tour-ai-conf-price-row strong,
.tour-ai-conf-price-row span:last-child {
    font-weight: 600;
    color: #2c3e50;
    flex-shrink: 0;
    white-space: nowrap !important;
}

.tour-ai-conf-price-row.discount {
    color: #28a745;
}

.tour-ai-conf-price-row.discount span:last-child {
    color: #28a745;
    font-weight: 700;
    flex-shrink: 0;
    white-space: nowrap !important;
}

.tour-ai-conf-price-divider {
    height: 1px;
    background: #dbe7eb;
    margin: 10px 0;
}

.tour-ai-conf-price-row.total-row {
    font-size: 1.05rem;
    font-weight: 800;
    color: #1a4d55;
    margin-bottom: 0;
    padding-top: 2px;
}

.tour-ai-conf-price-row.total-row .final-price {
    font-size: 1.25rem;
    font-weight: 800;
    color: #1d6e7c;
    letter-spacing: -0.3px;
}

.tour-ai-item-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #e1eff2;
    color: #1d6e7c;
    font-size: 0.74rem;
    font-weight: 700;
    margin-right: 6px;
    vertical-align: middle;
    flex-shrink: 0;
}

.tour-ai-conf-price-row.service-item-row {
    padding-left: 6px;
    font-size: 0.85rem;
    color: #4b6b70;
}

/* Checkout CTA */
.tour-ai-conf-cta {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.tour-ai-conf-pay-btn {
    width: 100%;
    display: flex !important;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
    color: #ffffff !important;
    padding: 14px 24px !important;
    border-radius: 10px !important;
    font-size: 1.02rem !important;
    font-weight: 700 !important;
    text-decoration: none !important;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35) !important;
    transition: all 0.25s ease !important;
    cursor: pointer;
    border: none !important;
}

.tour-ai-conf-pay-btn:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 22px rgba(16, 185, 129, 0.45) !important;
    color: #ffffff !important;
    opacity: 0.97;
}

.tour-ai-conf-guarantee {
    font-size: 0.74rem;
    color: #7b9196;
    display: flex;
    align-items: center;
    gap: 4px;
    text-align: center;
    font-weight: 500;
}

.tour-ai-conf-guarantee i {
    color: #10b981;
}

/* =========================================================
   STEP LOCKING & PAYMENT COMPLETED STATES
   ========================================================= */

/* Confirmed Payment Badge */
.tour-ai-conf-badge.paid {
    background: rgba(16, 185, 129, 0.28) !important;
    border-color: rgba(16, 185, 129, 0.6) !important;
    color: #a7f3d0 !important;
}

/* Payment Completed Non-Clickable CTA */
.tour-ai-conf-paid-btn {
    width: 100%;
    display: flex !important;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
    color: #ffffff !important;
    padding: 14px 24px !important;
    border-radius: 10px !important;
    font-size: 1.02rem !important;
    font-weight: 700 !important;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.25) !important;
    pointer-events: none !important;
    cursor: default !important;
    user-select: none;
    border: none !important;
}

/* Payment Completed inline badge for raw links */
.tour-ai-payment-completed-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 20px;
    background: #ecfdf5;
    color: #065f46;
    font-weight: 700;
    font-size: 0.88rem;
    border: 1px solid #a7f3d0;
    pointer-events: none;
    user-select: none;
}

.tour-ai-payment-btn.paid,
a.tour-ai-payment-btn.paid {
    pointer-events: none !important;
    cursor: default !important;
    opacity: 0.8 !important;
    background: #059669 !important;
    color: #ffffff !important;
}

/* Locked Form (when submitted or payment completed) */
.tour-ai-form-locked {
    pointer-events: none !important;
    opacity: 0.85 !important;
    user-select: none;
}

.tour-ai-form-locked input,
.tour-ai-form-locked select,
.tour-ai-form-locked textarea,
.tour-ai-form-locked button,
.tour-ai-form-locked .tour-ai-radio-label,
.tour-ai-form-locked .tour-ai-percent-chip {
    cursor: not-allowed !important;
    pointer-events: none !important;
}

.tour-ai-form-locked .tour-ai-form-submit-btn {
    background: #475569 !important;
    box-shadow: none !important;
    cursor: not-allowed !important;
    opacity: 0.9 !important;
}

.tour-ai-form-locked .tour-ai-coupon-btn {
    pointer-events: none !important;
    opacity: 0.5 !important;
}

/* Disabled Action Buttons From Past Steps */
.tour-ai-action-btn.past-step-disabled:not(.selected) {
    opacity: 0.45 !important;
    cursor: not-allowed !important;
    pointer-events: none !important;
    transform: none !important;
    box-shadow: none !important;
}

/* =========================================================
   INVOICE ACTIONS & MODAL STYLES
   ========================================================= */

.view_invoice_btn.pdf_popup .booking_receipt_cancel{
	display:none;
}

.tour-ai-conf-invoice-actions {
    display: flex;
    gap: 10px;
    width: 100%;
    margin-top: 10px;
}

@media (max-width: 576px) {
    .tour-ai-conf-invoice-actions {
        flex-direction: column;
    }
}

.tour-ai-conf-invoice-btn {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 11px 18px;
    font-size: 0.92rem;
    font-weight: 700;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    text-decoration: none;
    text-align: center;
}

.tour-ai-conf-invoice-btn.download {
    background: linear-gradient(135deg, #55a7b5 0%, #3e8895 100%);
    color: #ffffff !important;
    box-shadow: 0 3px 10px rgba(85, 167, 181, 0.35);
}

.tour-ai-conf-invoice-btn.download:hover {
    background: linear-gradient(135deg, #3e8895 0%, #2f6b76 100%);
    transform: translateY(-1px);
    box-shadow: 0 5px 14px rgba(85, 167, 181, 0.45);
}

.tour-ai-conf-invoice-btn.view {
    background: #ffffff;
    color: #1d6e7c !important;
    border: 1.5px solid #a3d2db;
}

.tour-ai-conf-invoice-btn.view:hover {
    background: #eef7f9;
    border-color: #55a7b5;
    color: #114b55 !important;
}

/* Invoice Modal */
.tour-ai-invoice-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 9999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.tour-ai-invoice-modal.d-none {
    display: none !important;
}

.tour-ai-invoice-modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(4px);
}

.tour-ai-invoice-modal-content {
    position: relative;
    background: #ffffff;
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    border-radius: 12px;
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.25);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: taiModalPop 0.25s ease-out;
}

@keyframes taiModalPop {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.tour-ai-invoice-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}

.tour-ai-invoice-modal-body {
    padding: 20px;
    overflow-y: auto;
    background: #ffffff;
}

.tour-ai-invoice-action-btn {
    border: none;
    cursor: pointer;
    border-radius: 6px;
    font-size: 0.88rem;
    font-weight: 600;
    transition: all 0.2s ease;
}

.tour-ai-invoice-action-btn.primary {
    background: #55a7b5;
    color: #ffffff;
    padding: 7px 14px;
}

.tour-ai-invoice-action-btn.primary:hover {
    background: #3e8895;
}

.tour-ai-invoice-action-btn.close {
    background: transparent;
    color: #64748b;
    padding: 6px 10px;
    font-size: 1.1rem;
}

.tour-ai-invoice-action-btn.close:hover {
    color: #0f172a;
    background: #e2e8f0;
}

/* =========================================================
   RESPONSIVE DESIGN: TABLET & MOBILE (< 768px & < 576px)
   ========================================================= */

@media (max-width: 768px) {
    /* Header layout */
    .tour-ai-header {
        padding: 10px 14px;
        flex-wrap: nowrap;
        gap: 8px;
    }

    .tour-ai-avatar-header {
        width: 36px;
        height: 36px;
        font-size: 17px;
        margin-right: 10px !important;
    }

    .tour-ai-title {
        font-size: 0.98rem;
    }

    .tour-ai-subtitle {
        font-size: 0.72rem;
        flex-wrap: wrap;
        gap: 4px;
    }

    .tour-ai-reset-btn {
        padding: 5px 10px;
        font-size: 0.75rem;
        white-space: nowrap;
    }

    /* Message bubbles */
    .tour-ai-bubble-user {
        max-width: 88%;
        font-size: 0.88rem;
        padding: 9px 14px;
    }

    .tour-ai-bubble-ai {
        max-width: 92%;
        font-size: 0.88rem;
        padding: 12px 14px;
    }

    .tour-ai-avatar-msg {
        width: 30px;
        height: 30px;
        font-size: 13px;
        margin-right: 8px;
    }

    /* Action buttons & pills */
    .tour-ai-action-btn {
        font-size: 0.82rem;
        padding: 6px 12px;
        margin: 3px 4px 3px 0;
        max-width: 100%;
        box-sizing: border-box;
        white-space: normal;
        word-break: break-word;
        text-align: left;
    }

    /* Inline booking form card */
    .tour-ai-inline-form-card {
        padding: 14px 12px;
        border-radius: 12px;
        margin: 10px 0 4px 0;
        width: 100%;
        box-sizing: border-box;
    }

    .tour-ai-form-header {
        flex-wrap: wrap;
        gap: 6px;
    }

    .tour-ai-form-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .tour-ai-grid-3 {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    /* Services list - Clean, structured mobile presentation */
    .tour-ai-services-grid {
        gap: 8px;
    }

    .tour-ai-service-item {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        padding: 12px;
        border-radius: 10px;
        background: #f8fafc;
        border: 1.5px solid #dce8ec;
        box-sizing: border-box;
        width: 100%;
    }

    .tour-ai-service-main {
        display: flex;
        align-items: flex-start;
        gap: 10px;
        width: 100%;
    }

    .tour-ai-service-item input[type="checkbox"] {
        width: 20px;
        height: 20px;
        margin: 1px 0 0 0;
        flex-shrink: 0;
    }

    .tour-ai-service-meta {
        flex: 1;
        min-width: 0;
    }

    .tour-ai-service-name {
        font-size: 0.86rem;
        line-height: 1.35;
        font-weight: 600;
    }

    .tour-ai-service-desc {
        font-size: 0.74rem;
        margin-top: 2px;
        line-height: 1.3;
    }

    .tour-ai-service-right {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        padding-top: 8px;
        padding-left: 30px; /* Align nicely past the 20px checkbox + gap */
        border-top: 1px dashed #e2edf0;
        box-sizing: border-box;
        flex-wrap: wrap;
        gap: 8px;
    }

    .tour-ai-service-qty-wrap {
        padding: 3px 8px;
        gap: 6px;
    }

    .tour-ai-service-qty {
        width: 48px;
        height: 28px;
        font-size: 0.85rem;
    }

    .tour-ai-service-price-badge {
        font-size: 0.8rem;
        padding: 4px 10px;
        margin-left: auto;
    }

    /* Phone input wrap */
    .tour-ai-phone-input-wrap {
        display: flex;
        flex-wrap: nowrap;
        gap: 6px;
    }

    .tour-ai-phone-country {
        flex: 0 0 110px;
        max-width: 125px;
        min-width: 95px;
        font-size: 0.78rem;
        padding: 8px 4px;
    }

    /* Payment option radio buttons */
    .tour-ai-payment-type-wrap {
        flex-direction: column;
        gap: 8px;
    }

    .tour-ai-radio-label {
        padding: 10px 12px;
        font-size: 0.84rem;
    }

    .tour-ai-percent-selector {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .tour-ai-percent-chips {
        width: 100%;
        display: flex;
        gap: 6px;
    }

    .tour-ai-percent-chip {
        flex: 1;
        padding: 6px 10px;
        font-size: 0.8rem;
        text-align: center;
    }

    /* Price breakdown card */
    .tour-ai-price-details-card {
        padding: 10px 12px;
    }

    .tour-ai-price-row {
        font-size: 0.8rem;
        gap: 8px;
    }

    .tour-ai-price-row > span:first-child {
        min-width: 0;
        overflow-wrap: break-word;
    }

    .tour-ai-price-row > strong,
    .tour-ai-price-row > span:last-child {
        flex-shrink: 0;
        white-space: nowrap !important;
    }

    .tour-ai-price-row.tour-ai-addon-row {
        padding: 4px 6px;
        font-size: 0.78rem;
        gap: 6px;
    }

    .tour-ai-price-row.tour-ai-addon-row strong {
        flex-shrink: 0;
        white-space: nowrap !important;
    }

    .tour-ai-price-row.tour-ai-total-row strong {
        font-size: 0.98rem;
        flex-shrink: 0;
        white-space: nowrap !important;
    }

    /* Terms checkbox */
    .tour-ai-terms-label {
        font-size: 0.74rem;
        line-height: 1.4;
    }

    /* Submit and checkout buttons */
    .tour-ai-form-submit-btn {
        padding: 12px 16px;
        font-size: 0.92rem;
        min-height: 44px;
        word-break: break-word;
    }

    .tour-ai-conf-header {
        padding: 12px 14px;
    }

    .tour-ai-conf-body {
        padding: 14px;
    }

    .tour-ai-conf-tour-title {
        font-size: 1.05rem;
        word-break: break-word;
        overflow-wrap: break-word;
    }

    .tour-ai-conf-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .tour-ai-conf-pricing-box {
        padding: 12px 14px;
    }

    .tour-ai-conf-price-row {
        font-size: 0.82rem;
        gap: 8px;
    }

    .tour-ai-conf-price-row > span:first-child {
        min-width: 0;
        overflow-wrap: break-word;
    }

    .tour-ai-conf-price-row strong,
    .tour-ai-conf-price-row span:last-child {
        flex-shrink: 0;
        white-space: nowrap !important;
    }

    .tour-ai-conf-price-row.total-row .final-price {
        font-size: 1.15rem;
        flex-shrink: 0;
        white-space: nowrap !important;
    }

    .tour-ai-conf-pay-btn,
    .tour-ai-conf-paid-btn {
        padding: 12px 18px !important;
        font-size: 0.96rem !important;
        min-height: 44px;
    }

    /* Bottom input footer */
    .tour-ai-footer {
        padding: 8px 12px 10px 12px;
    }

    .tour-ai-chips-wrap {
        padding: 6px 12px 4px 12px;
    }

    .tour-ai-badge-row {
        flex-direction: column;
        gap: 4px;
        font-size: 0.7rem;
    }
}

@media (max-width: 576px) {
    .tour-ai-badge-row {
        display: none; /* Hide trust badge row on small mobile to maximize chat/input visibility */
    }
    .tour-ai-container {
        margin: 0 auto;
        padding: 0 4px !important;
        height: 100vh;
        height: 100dvh;
        min-height: 380px;
        max-height: 100dvh;
    }

    .tour-ai-card {
        border-radius: 10px;
        border: none;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
        height: 100%;
        min-height: 0;
    }

    .tour-ai-header {
        padding: 8px 10px;
    }

    .tour-ai-title {
        font-size: 0.92rem;
        line-height: 1.25;
    }

    .tour-ai-subtitle {
        display: none; /* Keep header concise on ultra small screens */
    }

    .tour-ai-reset-btn {
        padding: 4px 8px;
        font-size: 0.72rem;
        min-height: 32px;
    }

    .tour-ai-reset-btn span {
        display: inline;
    }

    .tour-ai-messages-wrap {
        padding: 10px 8px 24px 8px !important;
    }

    .tour-ai-bubble-user {
        max-width: 90%;
        font-size: 0.86rem;
        padding: 8px 12px;
        border-radius: 14px 14px 2px 14px;
    }

    .tour-ai-bubble-ai {
        max-width: 95%;
        font-size: 0.86rem;
        padding: 10px 12px;
        border-radius: 14px 14px 14px 2px;
    }

    .tour-ai-avatar-msg {
        width: 26px;
        height: 26px;
        font-size: 12px;
        margin-right: 6px;
    }

    .tour-ai-action-btn {
        font-size: 0.8rem;
        padding: 6px 10px;
        margin: 3px 3px 3px 0;
        min-height: 36px;
        max-width: 100%;
        box-sizing: border-box;
        text-align: left;
    }

    .tour-ai-inline-form-card {
        padding: 12px 10px;
        border-radius: 10px;
    }

    .tour-ai-form-header {
        font-size: 0.88rem;
        padding-bottom: 6px;
        margin-bottom: 10px;
    }

    .tour-ai-form-step-sec {
        margin-top: 10px;
        padding-top: 10px;
    }

    .tour-ai-step-title {
        font-size: 0.8rem;
        margin-bottom: 8px;
    }

    .tour-ai-form-input,
    .tour-ai-form-textarea {
        padding: 8px 10px;
        font-size: 16px; /* 16px font size on iOS & Android prevents auto-zoom when keyboard opens */
    }

    .tour-ai-phone-country {
        flex: 0 0 95px;
        max-width: 105px;
        min-width: 85px;
        font-size: 14px;
        padding: 7px 4px;
    }

    .tour-ai-coupon-input-wrap {
        gap: 6px;
    }

    .tour-ai-coupon-input {
        font-size: 16px; /* Prevents auto-zoom */
    }

    .tour-ai-coupon-apply-btn {
        padding: 8px 12px;
        font-size: 0.82rem;
        min-height: 38px;
    }

    .tour-ai-footer {
        padding: 6px 8px 8px 8px;
        /* Keep input field pinned and clear of device home bars, notches & safe areas */
        padding-bottom: max(8px, env(safe-area-inset-bottom, 8px));
    }

    .tour-ai-input-box {
        padding: 3px 6px 3px 12px;
        border-radius: 20px;
    }

    .tour-ai-input-field {
        font-size: 16px; /* Prevents unwanted browser auto-zoom on mobile focus */
        padding: 6px 4px 6px 0;
        min-height: 24px;
        line-height: 1.4;
    }

    .tour-ai-send-btn {
        width: 36px;
        height: 36px;
        min-width: 36px;
        margin-bottom: 2px;
    }

    .tour-ai-invoice-modal {
        padding: 8px;
    }

    .tour-ai-invoice-modal-content {
        max-height: 94vh;
        border-radius: 10px;
    }

    .tour-ai-invoice-modal-header {
        padding: 10px 12px;
    }

    .tour-ai-invoice-modal-body {
        padding: 12px 8px;
    }
}
