/* =============================================================================
   The Bharat Journey — Advanced Features CSS
   Scoped with .tbj- prefixes to avoid conflicts with main.css / inline styles.
   Covers: comparison tool, booking modal, lightbox, sticky enquiry,
   WhatsApp chat widget, interactive India map, trip planner, weather badge.
   ============================================================================= */

:root {
    --tbj-orange: #FF6B00;
    --tbj-orange-dark: #e05a00;
    --tbj-navy: #0A3D62;
}

/* ── Card extra actions (compare + enquire) ──────────────────────────────── */
.tbj-card-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #f2f2f2;
}
.tbj-compare-check {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.82rem;
    font-weight: 600;
    color: #555;
    cursor: pointer;
    user-select: none;
}
.tbj-compare-check input { accent-color: var(--tbj-orange); cursor: pointer; }
.tbj-enquire-btn {
    background: transparent;
    border: 1.5px solid var(--tbj-orange);
    color: var(--tbj-orange);
    font-size: 0.8rem;
    font-weight: 700;
    padding: 7px 16px;
    border-radius: 30px;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.2s, color 0.2s;
}
.tbj-enquire-btn:hover { background: var(--tbj-orange); color: #fff; }

/* ── FEATURE 3: Comparison bar + modal ───────────────────────────────────── */
.tbj-compare-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    box-shadow: 0 -6px 28px rgba(0,0,0,0.16);
    z-index: 9500;
    transform: translateY(110%);
    transition: transform 0.35s ease;
    padding: 14px 20px;
}
.tbj-compare-bar.is-visible { transform: translateY(0); }
.tbj-compare-bar__inner {
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}
.tbj-compare-bar__items { display: flex; gap: 10px; flex: 1; flex-wrap: wrap; }
.tbj-compare-thumb {
    position: relative;
    width: 64px;
    height: 48px;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid #eee;
    background: #f3f3f3;
}
.tbj-compare-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tbj-compare-thumb__remove {
    position: absolute;
    top: -6px;
    right: -6px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--tbj-navy);
    color: #fff;
    border: none;
    font-size: 11px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}
.tbj-compare-bar__label { font-size: 0.85rem; color: #777; font-weight: 600; }
.tbj-compare-bar__actions { display: flex; gap: 10px; align-items: center; }
.tbj-compare-now {
    background: var(--tbj-orange);
    color: #fff;
    border: none;
    border-radius: 30px;
    padding: 11px 24px;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.2s;
}
.tbj-compare-now:hover { background: var(--tbj-orange-dark); }
.tbj-compare-now:disabled { opacity: 0.5; cursor: not-allowed; }
.tbj-compare-clear {
    background: none;
    border: none;
    color: #999;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: underline;
    font-family: inherit;
}

.tbj-compare-modal,
.tbj-booking-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(10,61,98,0.65);
    backdrop-filter: blur(4px);
    display: none;
    align-items: flex-start;
    justify-content: center;
    padding: 40px 16px;
    overflow-y: auto;
}
.tbj-compare-modal.is-open,
.tbj-booking-modal.is-open { display: flex; }
.tbj-compare-modal__panel {
    background: #fff;
    border-radius: 16px;
    max-width: 1000px;
    width: 100%;
    padding: 28px;
    position: relative;
}
.tbj-modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: #f1f1f1;
    color: #444;
    font-size: 1.1rem;
    cursor: pointer;
    line-height: 1;
}
.tbj-modal-close:hover { background: var(--tbj-orange); color: #fff; }
.tbj-compare-modal__panel h2 {
    font-family: 'Playfair Display', serif;
    color: var(--tbj-navy);
    margin: 0 0 18px;
}
.tbj-compare-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.tbj-compare-table th,
.tbj-compare-table td {
    border: 1px solid #eee;
    padding: 12px;
    text-align: left;
    vertical-align: top;
}
.tbj-compare-table th {
    background: #FFF8E7;
    color: var(--tbj-navy);
    font-weight: 700;
    width: 140px;
}
.tbj-compare-table thead th { text-align: center; background: var(--tbj-navy); color: #fff; }
.tbj-compare-table thead img {
    width: 100%;
    max-width: 200px;
    height: 100px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 8px;
}

/* ── FEATURE 4 + 11: Booking modal ───────────────────────────────────────── */
.tbj-booking-modal__panel {
    background: #fff;
    border-radius: 16px;
    max-width: 520px;
    width: 100%;
    padding: 30px;
    position: relative;
}
.tbj-booking-modal__panel h2 {
    font-family: 'Playfair Display', serif;
    color: var(--tbj-navy);
    margin: 0 0 6px;
    font-size: 1.5rem;
}
.tbj-booking-modal__panel p.tbj-booking-sub { color: #777; margin: 0 0 18px; font-size: 0.9rem; }
.tbj-booking-form { display: grid; gap: 12px; }
.tbj-booking-form input,
.tbj-booking-form textarea {
    width: 100%;
    border: 1.5px solid #e0e0e0;
    border-radius: 8px;
    padding: 11px 14px;
    font-size: 0.92rem;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s;
}
.tbj-booking-form input:focus,
.tbj-booking-form textarea:focus { border-color: var(--tbj-orange); }
.tbj-booking-form .tbj-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tbj-booking-submit {
    background: var(--tbj-orange);
    color: #fff;
    border: none;
    border-radius: 30px;
    padding: 13px;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.2s;
}
.tbj-booking-submit:hover { background: var(--tbj-orange-dark); }
.tbj-booking-submit:disabled { opacity: 0.6; cursor: not-allowed; }
.tbj-booking-whatsapp {
    background: #25D366;
    color: #fff;
    border: none;
    border-radius: 30px;
    padding: 13px;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    font-family: inherit;
    text-align: center;
    text-decoration: none;
    display: block;
}
.tbj-booking-whatsapp:hover { background: #1da851; color: #fff; }
.tbj-booking-msg { font-size: 0.88rem; padding: 10px 0; min-height: 1px; }
.tbj-booking-msg.success { color: #2e7d32; }
.tbj-booking-msg.error { color: #c62828; }
.tbj-booking-pay {
    background: #072654;
    color: #fff;
    border: none;
    border-radius: 30px;
    padding: 13px;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    font-family: inherit;
    margin-top: 8px;
    width: 100%;
}
.tbj-booking-pay:hover { background: #0a3d62; }

/* ── FEATURE 5: Lightbox ─────────────────────────────────────────────────── */
.tbj-lb {
    position: fixed;
    inset: 0;
    z-index: 10050;
    background: rgba(0,0,0,0.92);
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}
.tbj-lb.is-open { display: flex; }
.tbj-lb__img {
    max-width: 90vw;
    max-height: 82vh;
    object-fit: contain;
    border-radius: 8px;
    opacity: 0;
    transition: opacity 0.25s;
}
.tbj-lb__img.is-loaded { opacity: 1; }
.tbj-lb__caption { color: rgba(255,255,255,0.8); margin-top: 14px; font-size: 0.9rem; text-align: center; padding: 0 20px; }
.tbj-lb__btn {
    position: absolute;
    background: rgba(255,255,255,0.12);
    border: none;
    color: #fff;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}
.tbj-lb__btn:hover { background: rgba(255,255,255,0.25); }
.tbj-lb__prev { left: 20px; top: 50%; transform: translateY(-50%); }
.tbj-lb__next { right: 20px; top: 50%; transform: translateY(-50%); }
.tbj-lb__close { top: 18px; right: 18px; width: 42px; height: 42px; font-size: 1.2rem; }
.tbj-lb__spinner {
    position: absolute;
    width: 44px;
    height: 44px;
    border: 4px solid rgba(255,255,255,0.25);
    border-top-color: #fff;
    border-radius: 50%;
    animation: tbj-spin 0.8s linear infinite;
    display: none;
}
.tbj-lb.is-loading .tbj-lb__spinner { display: block; }
@keyframes tbj-spin { to { transform: rotate(360deg); } }
.tbj-lightbox-trigger { cursor: zoom-in; }

/* ── FEATURE 10: Sticky enquiry widget ───────────────────────────────────── */
.tbj-sticky-enquiry {
    position: fixed;
    right: 20px;
    bottom: 90px;
    width: 300px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 16px 50px rgba(0,0,0,0.22);
    z-index: 9400;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: opacity 0.3s, transform 0.3s, visibility 0.3s;
}
.tbj-sticky-enquiry.is-visible { opacity: 1; visibility: visible; transform: translateY(0); }
.tbj-sticky-enquiry__inner { padding: 20px; }
.tbj-sticky-enquiry h4 {
    font-family: 'Playfair Display', serif;
    color: var(--tbj-navy);
    margin: 0 0 4px;
    font-size: 1.15rem;
}
.tbj-sticky-enquiry p { color: #777; font-size: 0.82rem; margin: 0 0 12px; }
.tbj-sticky-enquiry input,
.tbj-sticky-enquiry select {
    width: 100%;
    border: 1.5px solid #e0e0e0;
    border-radius: 8px;
    padding: 9px 12px;
    font-size: 0.85rem;
    font-family: inherit;
    margin-bottom: 9px;
    outline: none;
}
.tbj-sticky-enquiry input:focus,
.tbj-sticky-enquiry select:focus { border-color: var(--tbj-orange); }
.tbj-sticky-enquiry__whatsapp,
.tbj-sticky-enquiry__call {
    display: block;
    width: 100%;
    text-align: center;
    border: none;
    border-radius: 30px;
    padding: 11px;
    font-weight: 700;
    font-size: 0.88rem;
    cursor: pointer;
    font-family: inherit;
    text-decoration: none;
    margin-bottom: 8px;
}
.tbj-sticky-enquiry__whatsapp { background: #25D366; color: #fff; }
.tbj-sticky-enquiry__whatsapp:hover { background: #1da851; color: #fff; }
.tbj-sticky-enquiry__call { background: var(--tbj-navy); color: #fff; }
.tbj-sticky-enquiry__call:hover { background: #06283d; color: #fff; }
.tbj-sticky-enquiry__close {
    position: absolute;
    top: 8px;
    right: 10px;
    background: none;
    border: none;
    font-size: 1.2rem;
    color: #999;
    cursor: pointer;
    line-height: 1;
}
@media (max-width: 768px) {
    .tbj-sticky-enquiry { display: none; }
}

/* ── FEATURE 12: WhatsApp chat widget ────────────────────────────────────── */
.tbj-wa-chat {
    position: fixed;
    right: 20px;
    bottom: 90px;
    width: 320px;
    max-width: calc(100vw - 40px);
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 16px 50px rgba(0,0,0,0.25);
    z-index: 9600;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: opacity 0.3s, transform 0.3s, visibility 0.3s;
}
.tbj-wa-chat.is-open { opacity: 1; visibility: visible; transform: translateY(0); }
.tbj-wa-chat__header {
    background: #075E54;
    color: #fff;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}
.tbj-wa-chat__avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: #25D366;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}
.tbj-wa-chat__name { font-weight: 700; font-size: 0.95rem; display: block; }
.tbj-wa-chat__status { font-size: 0.75rem; opacity: 0.85; display: flex; align-items: center; gap: 5px; }
.tbj-wa-chat__status::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: #4ade80; display: inline-block; }
.tbj-wa-chat__close {
    margin-left: auto;
    background: none;
    border: none;
    color: #fff;
    font-size: 1.2rem;
    cursor: pointer;
    line-height: 1;
}
.tbj-wa-chat__body { padding: 18px; background: #ECE5DD; }
.tbj-wa-chat__msg {
    background: #fff;
    border-radius: 0 10px 10px 10px;
    padding: 12px 14px;
    font-size: 0.88rem;
    color: #333;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
    margin-bottom: 14px;
}
.tbj-wa-chat__replies { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.tbj-wa-chat__reply {
    background: #fff;
    border: 1.5px solid #25D366;
    color: #075E54;
    border-radius: 20px;
    padding: 8px 14px;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    text-align: left;
    text-decoration: none;
}
.tbj-wa-chat__reply:hover { background: #25D366; color: #fff; }
.tbj-wa-chat__start {
    display: block;
    background: #25D366;
    color: #fff;
    text-align: center;
    border-radius: 30px;
    padding: 11px;
    font-weight: 700;
    font-size: 0.9rem;
    text-decoration: none;
}
.tbj-wa-chat__start:hover { background: #1da851; color: #fff; }

/* ── FEATURE 7: Weather badge ────────────────────────────────────────────── */
.tbj-weather-badge {
    position: absolute;
    bottom: 12px;
    right: 12px;
    background: rgba(255,255,255,0.94);
    color: var(--tbj-navy);
    border-radius: 20px;
    padding: 4px 10px;
    font-size: 0.72rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    z-index: 3;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    cursor: help;
}

/* ── FEATURE 13: India interactive map ───────────────────────────────────── */
.tbj-region-section { padding: 80px 0; background: #fff; }
.tbj-map-layout {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 40px;
    align-items: center;
}
.tbj-india-map { width: 100%; height: auto; max-width: 480px; margin: 0 auto; display: block; }
.tbj-region {
    fill: #d7e3ec;
    stroke: #fff;
    stroke-width: 2;
    cursor: pointer;
    transition: fill 0.2s, transform 0.2s;
    transform-origin: center;
}
.tbj-region:hover, .tbj-region.is-active { filter: brightness(0.92); }
.tbj-region[data-region="north"]    { fill: #4a90d9; }
.tbj-region[data-region="south"]    { fill: #2bb3a3; }
.tbj-region[data-region="east"]     { fill: #4caf50; }
.tbj-region[data-region="west"]     { fill: #ff8c42; }
.tbj-region[data-region="northeast"]{ fill: #9b6dd6; }
.tbj-region[data-region="islands"]  { fill: #ff7f7f; }
.tbj-region-label { font-size: 11px; font-weight: 700; fill: #fff; pointer-events: none; text-anchor: middle; }
.tbj-region-panel {
    background: #FFF8E7;
    border-radius: 16px;
    padding: 28px;
    min-height: 240px;
}
.tbj-region-panel h3 {
    font-family: 'Playfair Display', serif;
    color: var(--tbj-navy);
    margin: 0 0 6px;
    font-size: 1.5rem;
}
.tbj-region-panel p.tbj-region-states { color: #777; font-size: 0.85rem; margin: 0 0 18px; }
.tbj-region-dest { display: flex; gap: 12px; align-items: center; margin-bottom: 12px; }
.tbj-region-dest__icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--tbj-orange);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}
.tbj-region-dest__name { font-weight: 700; color: var(--tbj-navy); font-size: 0.95rem; display: block; }
.tbj-region-dest__desc { font-size: 0.8rem; color: #888; }
.tbj-map-pills { display: none; }
@media (max-width: 768px) {
    .tbj-map-layout { grid-template-columns: 1fr; }
    .tbj-india-map { display: none; }
    .tbj-map-pills { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-bottom: 8px; }
    .tbj-map-pill {
        background: #fff;
        border: 1.5px solid #e0e0e0;
        border-radius: 30px;
        padding: 8px 18px;
        font-size: 0.85rem;
        font-weight: 600;
        cursor: pointer;
        font-family: inherit;
    }
    .tbj-map-pill.is-active { background: var(--tbj-orange); color: #fff; border-color: var(--tbj-orange); }
}

/* ── AJAX filter spinner ─────────────────────────────────────────────────── */
.tbj-grid-loading { position: relative; min-height: 200px; }
.tbj-grid-loading::after {
    content: '';
    position: absolute;
    top: 40px;
    left: 50%;
    width: 44px;
    height: 44px;
    margin-left: -22px;
    border: 4px solid rgba(255,107,0,0.25);
    border-top-color: var(--tbj-orange);
    border-radius: 50%;
    animation: tbj-spin 0.8s linear infinite;
    z-index: 5;
}
.tbj-grid-loading > * { opacity: 0.4; }

/* ── FEATURE 6: Trip planner ─────────────────────────────────────────────── */
.tbj-planner { max-width: 760px; margin: 0 auto; padding: 50px 20px 70px; }
.tbj-planner__progress {
    height: 8px;
    background: #eee;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 8px;
}
.tbj-planner__progress-bar {
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, var(--tbj-orange), #FFB347);
    transition: width 0.4s ease;
}
.tbj-planner__step-count { text-align: right; font-size: 0.8rem; color: #999; margin-bottom: 30px; }
.tbj-planner__step { display: none; animation: tbj-fade 0.4s ease; }
.tbj-planner__step.is-active { display: block; }
@keyframes tbj-fade { from { opacity: 0; transform: translateX(16px); } to { opacity: 1; transform: translateX(0); } }
.tbj-planner__step h2 {
    font-family: 'Playfair Display', serif;
    color: var(--tbj-navy);
    text-align: center;
    margin: 0 0 26px;
    font-size: 1.7rem;
}
.tbj-planner__options { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.tbj-planner__option {
    border: 2px solid #e6e6e6;
    border-radius: 14px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--tbj-navy);
    background: #fff;
    transition: all 0.2s;
}
.tbj-planner__option:hover { border-color: var(--tbj-orange); }
.tbj-planner__option.is-selected { border-color: var(--tbj-orange); background: #FFF3E8; }
.tbj-planner__option .tbj-opt-icon { font-size: 1.8rem; display: block; margin-bottom: 8px; }
.tbj-planner__select {
    width: 100%;
    border: 2px solid #e6e6e6;
    border-radius: 12px;
    padding: 14px;
    font-size: 1rem;
    font-family: inherit;
}
.tbj-planner__nav { display: flex; justify-content: space-between; margin-top: 30px; gap: 12px; }
.tbj-planner__btn {
    border: none;
    border-radius: 30px;
    padding: 13px 30px;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    font-family: inherit;
}
.tbj-planner__btn--prev { background: #eee; color: #555; }
.tbj-planner__btn--prev:hover { background: #ddd; }
.tbj-planner__btn--next { background: var(--tbj-orange); color: #fff; margin-left: auto; }
.tbj-planner__btn--next:hover { background: var(--tbj-orange-dark); }
.tbj-planner__results { display: none; }
.tbj-planner__results.is-active { display: block; }
.tbj-planner__rec {
    background: linear-gradient(135deg, var(--tbj-navy), #1a5276);
    color: #fff;
    border-radius: 16px;
    padding: 28px;
    text-align: center;
    margin-bottom: 30px;
}
.tbj-planner__rec h3 { font-family: 'Playfair Display', serif; font-size: 1.8rem; margin: 0 0 8px; }
.tbj-planner__rec p { opacity: 0.9; margin: 0 0 16px; }
.tbj-planner__result-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 20px; }
@media (max-width: 560px) {
    .tbj-planner__options { grid-template-columns: 1fr; }
    .tbj-booking-form .tbj-form-row { grid-template-columns: 1fr; }
    .tbj-compare-table { font-size: 0.78rem; }
    .tbj-compare-table th { width: 90px; }
}
