/**
 * TripDust Package Builder Frontend Styles
 *
 * Clean, modern styling for the multi-step package builder interface.
 *
 * @package TripDust_Custom_Package_Builder
 * @since 1.0.0
 */

/* ========================================
   Typography - Load Inter Font
   ======================================== */
/* fonts inherited from theme (single combined request) */

/* ========================================
   Container & Layout
   ======================================== */

.tdpb-container {
    --tdpb-ink: #0F2740;
    --tdpb-ink-soft: #44576B;
    --tdpb-ink-muted: #5B6B7B;
    /* Primary CTA - The "Go" Button */
    --tdpb-accent: #0B62B9;        /* Brand blue (was sunset orange) */
    --tdpb-accent-strong: #094E94; /* Brand blue deep */
    --tdpb-accent-soft: #EDF4FB;   /* Brand blue soft (ring) */
    --tdpb-accent-warm: #094E94;   /* Brand blue deep (hover) */
    --tdpb-accent-rgb: 0, 59, 149;
    --tdpb-accent-soft-rgb: 235, 243, 255;
    
    --tdpb-surface: #ffffff;
    --tdpb-surface-muted: #F9FBFE;
    --tdpb-border: #E2EBF3;
    --tdpb-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
    --tdpb-radius: var(--td-radius, 12px);
    --tdpb-cta-shadow: none;

    --tdpb-font-body: var(--td-font-body, "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", sans-serif);
    --tdpb-font-display: var(--td-font-display, var(--tdpb-font-body));
    --tdpb-size-body: 17px;
    --tdpb-size-body-sm: 15px;
    --tdpb-size-body-xs: 14px;
    --tdpb-size-body-xxs: 13px;
    --tdpb-size-kicker: 12px;
    --tdpb-size-label: 13px;
    --tdpb-size-button: 16px;
    --tdpb-size-hero: clamp(24px, 3vw, 34px);
    --tdpb-size-title: clamp(22px, 2.6vw, 30px);
    --tdpb-size-price: clamp(32px, 4.8vw, 44px);
    --tdpb-size-city-title: clamp(17px, 2vw, 20px);
    --tdpb-size-days-count: clamp(18px, 2.6vw, 24px);
    --tdpb-size-activity-section: clamp(18px, 2vw, 22px);
    --tdpb-size-activity-title: clamp(14px, 1.5vw, 16px);
    --tdpb-size-activity-meta: clamp(12px, 1.3vw, 13px);
    --tdpb-size-activity-label: 12px;
    --tdpb-size-activity-input: 13px;
    --tdpb-size-activity-note: 12px;
    --tdpb-leading-body: var(--td-leading-body, 1.75);
    --tdpb-letter-body: 0.01em;

    font-family: var(--tdpb-font-body);
    font-size: var(--tdpb-size-body);
    line-height: var(--tdpb-leading-body);
    letter-spacing: var(--tdpb-letter-body);
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    font-feature-settings: "kern" 1, "liga" 1;
    color: var(--tdpb-ink);
    max-width: 1200px;
    margin: 0 auto;
    padding: 48px 32px;
    position: relative;
    background: #ffffff;
    border-radius: var(--tdpb-radius);
    border: 1px solid #E2EBF3;
    box-shadow: none;
    overflow: hidden;
    overflow: clip; /* unscrollable: focus/scrollIntoView can't shift content inside (stuck scrollLeft bug) */
    isolation: isolate;
}

.tdpb-container,
.tdpb-container *,
.tdpb-container *::before,
.tdpb-container *::after {
    box-sizing: border-box;
}

.tdpb-container::before,
.tdpb-container::after {
    content: none; /* flat site style — no decorative corner glows */
}

.tdpb-container::before {
    width: 280px;
    height: 280px;
    top: -120px;
    right: -90px;
    background: radial-gradient(circle at top, rgba(var(--tdpb-accent-rgb), 0.32), rgba(var(--tdpb-accent-rgb), 0));
}

.tdpb-container::after {
    width: 240px;
    height: 240px;
    bottom: -120px;
    left: -80px;
    background: radial-gradient(circle at bottom, rgba(var(--tdpb-accent-rgb), 0.22), rgba(var(--tdpb-accent-rgb), 0));
}

/* ========================================
   Steps & Intro Screen
   ======================================== */

/* Mobile-first: Single column layout */
.tdpb-intro-hero {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 0;
}

.tdpb-intro-content {
    width: 100%;
}

/* Typography - Editorial & Premium */
.tdpb-container h1,
.tdpb-container h2,
.tdpb-container h3,
.tdpb-container h4,
.tdpb-container h5,
.tdpb-container h6 {
    font-family: var(--tdpb-font-display);
}

.tdpb-step-kicker {
    display: block;
    font-family: var(--tdpb-font-body);
    font-size: var(--tdpb-size-kicker);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--tdpb-ink-muted);
    margin-bottom: 8px;
    text-align: center;
}

.tdpb-intro-kicker {
    display: inline-block;
    font-family: var(--tdpb-font-body);
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--tdpb-accent-strong); /* Keep accent for intro kicker */
    margin-bottom: 12px;
}

.tdpb-step {
    display: none;
    animation: fadeIn 0.4s ease-in;
    background: var(--tdpb-surface);
    border-radius: var(--tdpb-radius);
    border: 1px solid rgba(15, 23, 42, 0.06);
    box-shadow: var(--tdpb-shadow);
    padding: 32px;
    /*padding: 20px;*/
    position: relative;
    z-index: 1;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.tdpb-step.tdpb-active {
    display: block;
}

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

.tdpb-step-title {
    font-family: var(--tdpb-font-display);
    font-size: var(--tdpb-size-title);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.02em;
    color: var(--tdpb-ink); /* Dark Ink for better contrast, accent is for highlights */
    margin-bottom: 16px;
    text-align: center;
}

/* Remove the decorative line to keep it clean */
.tdpb-step-title::after {
    display: none;
}

.tdpb-intro-title {
    font-family: var(--tdpb-font-display);
    font-size: var(--tdpb-size-hero);
    font-weight: 800;
    line-height: 1.26;
    letter-spacing: -0.02em;
    color: var(--tdpb-ink);
    margin: 0 0 12px;
}

.tdpb-intro-text {
    margin: 0 0 18px;
    font-size: var(--tdpb-size-body);
    line-height: var(--tdpb-leading-body);
    color: var(--tdpb-ink-soft);
    max-width: 560px;
}

.tdpb-intro-highlights {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    margin: 18px 0 0;
}

.tdpb-highlight {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border: 1px solid var(--tdpb-border);
    border-radius: var(--tdpb-radius);
    background: #ffffff;
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.tdpb-highlight-icon {
    width: 32px;
    height: 32px;
    border-radius: 999px;
    background: var(--tdpb-accent);
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: var(--tdpb-size-body-xs);
    font-weight: 700;
    flex-shrink: 0;
}

.tdpb-highlight-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.tdpb-highlight-title {
    font-size: var(--tdpb-size-body-xs);
    font-weight: 700;
    color: var(--tdpb-ink);
}

.tdpb-highlight-text {
    font-size: var(--tdpb-size-body-xxs);
    color: var(--tdpb-ink-muted);
}

.tdpb-intro-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    margin-top: 20px;
}

.tdpb-intro-cta-sentinel {
    display: block;
    width: 100%;
    height: 1px;
}

.tdpb-btn-intro {
    width: 100%;
    margin: 0;
}

.tdpb-intro-note {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0;
    font-size: var(--tdpb-size-body-xxs);
    color: var(--tdpb-ink-muted);
}

.tdpb-intro-note span {
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid var(--tdpb-border);
    background: #f8fafc;
    font-weight: 600;
}

.tdpb-intro-sidebar {
    width: 100%;
}

.tdpb-flow-card {
    padding: 16px;
    border-radius: var(--tdpb-radius);
    border: 1px solid var(--tdpb-border);
    background: #ffffff;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.tdpb-flow-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}

.tdpb-flow-title {
    font-size: var(--tdpb-size-body-sm);
    font-weight: 700;
    color: var(--tdpb-ink);
}

.tdpb-flow-meta {
    font-size: var(--tdpb-size-kicker);
    font-weight: 700;
    color: #ffffff;
    background: var(--tdpb-accent);
    padding: 4px 8px;
    border-radius: 999px;
}

.tdpb-flow-summary {
    margin: 0 0 10px;
    font-size: var(--tdpb-size-body-xxs);
    color: var(--tdpb-ink-soft);
    line-height: 1.5;
}

.tdpb-flow-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: var(--tdpb-size-body-xxs);
    font-weight: 600;
    color: var(--tdpb-accent-strong);
    text-decoration: none;
    margin-bottom: 8px;
}

.tdpb-flow-link:hover {
    color: var(--tdpb-accent);
}

.tdpb-flow-list {
    list-style: none;
    margin: 12px 0 0;
    padding: 0;
    display: none;
    gap: 10px;
}

.tdpb-flow-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: var(--tdpb-size-body-xxs);
    color: var(--tdpb-ink-soft);
}

.tdpb-flow-num {
    width: 22px;
    height: 22px;
    border-radius: 999px;
    background: var(--tdpb-accent);
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: var(--tdpb-size-kicker);
    font-weight: 700;
    flex-shrink: 0;
}

.tdpb-flow-badges {
    display: none;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.tdpb-flow-badges span {
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid var(--tdpb-border);
    background: #f8fafc;
    font-size: var(--tdpb-size-kicker);
    color: var(--tdpb-ink-muted);
}

.tdpb-step-subtitle {
    font-family: var(--tdpb-font-body);
    margin: 0 0 32px;
    text-align: center;
    font-size: var(--tdpb-size-body);
    color: var(--tdpb-ink-soft);
    text-transform: none; /* Remove uppercase for subtitle, make it conversational */
    letter-spacing: normal;
    font-weight: 500;
    line-height: 1.5;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* ========================================
   Form Elements
   ======================================== */

.tdpb-form-group {
    margin-bottom: 25px;
}

.tdpb-form-group label {
    display: block;
    font-size: var(--tdpb-size-label);
    font-weight: 600;
    color: var(--tdpb-ink-muted);
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.tdpb-input {
    width: 100%;
    max-width: 440px;
    padding: 14px 16px;
    font-size: var(--tdpb-size-body);
    border: 1px solid var(--tdpb-border);
    border-radius: var(--tdpb-radius);
    background: #ffffff;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    display: block;
    min-width: 0;
}

.tdpb-input:focus {
    outline: none;
    border-color: var(--tdpb-accent);
    box-shadow: 0 0 0 4px rgba(var(--tdpb-accent-rgb), 0.18);
}

.tdpb-total-days {
    margin: 20px 0;
    padding: 18px 20px;
    background: var(--tdpb-accent-soft);
    border-radius: var(--tdpb-radius);
    border: 1px solid #CFE0F2;
    font-size: var(--tdpb-size-body);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.tdpb-total-days strong {
    font-size: var(--tdpb-size-body-xxs);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--tdpb-ink-muted);
}

#tdpb-days-count {
    font-size: var(--tdpb-size-days-count);
    font-weight: 700;
    color: var(--tdpb-accent-strong);
}

/* ========================================
   Pax Selection (Step 3)
   ======================================== */

.tdpb-pax-controls {
    max-width: 500px;
    margin: 0 auto 20px;
    gap: 10px;
}

.tdpb-pax-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 20px;
    /*margin-bottom: 12px;*/
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: var(--tdpb-radius);
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
    gap: 100px;
}

.tdpb-pax-row:last-child {
    margin-bottom: 0;
}

.tdpb-pax-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.tdpb-pax-label {
    font-size: var(--tdpb-size-body-sm);
    font-weight: 600;
    color: var(--tdpb-ink);
    letter-spacing: 0;
}

.tdpb-pax-helper {
    font-size: var(--tdpb-size-body-xxs);
    color: var(--tdpb-ink-muted);
    font-weight: 400;
}

/* Counter Controls */
.tdpb-counter,
.tdpb-pax-row,
.tdpb-pax-controls {
    /* Whole counter region, not just the buttons: a rapid second tap that lands a few
       px off the button (in the row/gap) would otherwise trigger iOS double-tap ZOOM —
       the viewport bounces and the number appears to dance. */
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.tdpb-counter {
    display: flex;
    align-items: center;
    gap: 12px;
}

.tdpb-counter-btn {
    width: 36px;
    height: 36px;
    display: flex !important;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    border: 1.5px solid #cbd5e1;
    border-radius: var(--tdpb-radius) !important;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: var(--tdpb-size-body) !important;
    font-weight: 600;
    color: var(--tdpb-ink-soft);
    /* iOS tap fixes: kill the 300ms double-tap-to-zoom delay/interference that made
       the counter feel jumpy, remove the grey tap flash, and stop text selection on
       rapid taps. */
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    -webkit-user-select: none;
    user-select: none;
}

/* Hover only on real-pointer (mouse) devices. On touch, iOS applies :hover on the
   first tap ("sticky hover") which flashes the button accent colour and makes the
   +/- feel like it's dancing — so restrict hover and use :active for tap feedback. */
@media (hover: hover) and (pointer: fine) {
    .tdpb-counter-btn:hover:not(:disabled) {
        background: var(--tdpb-accent);
        border-color: var(--tdpb-accent);
        color: #ffffff;
    }
}
.tdpb-counter-btn:active:not(:disabled) {
    background: var(--tdpb-accent);
    border-color: var(--tdpb-accent);
    color: #ffffff;
}

.tdpb-counter-btn:disabled {
    opacity: 0.25;
    cursor: not-allowed;
    background: #f8fafc;
}

.tdpb-counter-input {
    width: 50px;
    height: 36px;
    border-radius: var(--tdpb-radius) !important;
    text-align: center;
    font-size: var(--tdpb-size-body);
    font-weight: 600;
    color: var(--tdpb-ink) !important;
    border: 1.5px solid #cbd5e1;
    background-color: #ffffff;
    opacity: 1;
    padding: 0;
    /* line-height must stay `normal` (NOT 1 / a fixed px): iOS WebKit re-lays-out an
       input's text against a sub-normal or mismatched line-height box on every
       programmatic value change, so the digit visibly hopped up and down ("dancing")
       on each +/- tap. With `normal`, WebKit centers by the input's height — stable. */
    line-height: normal;
    box-sizing: border-box;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    -moz-appearance: textfield;
    -webkit-appearance: none;
    appearance: none;
    -webkit-text-fill-color: var(--tdpb-ink) !important;
    caret-color: transparent !important;
    text-indent: 0;
    font-variant-numeric: tabular-nums;
    /* The number is DISPLAY-ONLY (changed via the +/- buttons). On iOS a readonly
       <input> can still be focused/selected/magnified on a near-miss tap, which makes
       the digit jitter ("dance"). Make it inert so only the buttons are interactive. */
    pointer-events: none;
    -webkit-user-select: none;
    user-select: none;
    touch-action: manipulation;
}

.tdpb-counter-input:read-only,
.tdpb-counter-input[readonly] {
    opacity: 1 !important;
    color: var(--tdpb-ink) !important;
    -webkit-text-fill-color: var(--tdpb-ink) !important;
}

.tdpb-counter-input::-webkit-outer-spin-button,
.tdpb-counter-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Pax Summary - Compact Pill */
.tdpb-pax-summary {
    max-width: 500px;
    margin: 0 auto 24px;
    padding: 12px 20px;
    background: rgba(var(--tdpb-accent-rgb), 0.08);
    border-radius: 999px;
    /*display: inline-flex;*/
    align-items: center;
    gap: 8px;
    font-size: var(--tdpb-size-body-xs);
    color: var(--tdpb-ink-soft);
    width: auto;
    justify-content: center;
}

.tdpb-pax-summary-label {
    font-weight: 500;
}

.tdpb-pax-summary-count {
    font-size: var(--tdpb-size-body);
    font-weight: 700;
    color: var(--tdpb-accent-strong);
}

/* Step Actions - Side by Side */
.tdpb-step-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    max-width: 500px;
    margin: 0 auto;
}

.tdpb-step-actions .tdpb-btn {
    flex: 1;
    margin: 0;
}

.tdpb-step-actions .tdpb-btn-prev {
    background: #ffffff;
    color: var(--tdpb-ink-soft);
    border: 1.5px solid #cbd5e1;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
}

.tdpb-step-actions .tdpb-btn-prev:hover {
    background: #f8fafc;
    border-color: #94a3b8;
    transform: none;
}

/* ========================================
   Buttons
   ======================================== */

.tdpb-btn {
    padding: 14px 32px;
    font-size: var(--tdpb-size-button);
    font-weight: 600;
    border: none;
    border-radius: 999px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-right: 10px;
    margin-top: 20px;
}

.tdpb-btn-next,
.tdpb-btn-primary {
    background: #F0A028;
    color: #1a1a1a;
    /* amber fill is 2.15:1 on white — border carries the edge (3.91:1) */
    border: 1px solid var(--td-cta-border, #B5720D);
    box-shadow: 0 4px 10px rgba(254, 187, 2, 0.35);
}

.tdpb-btn-next:hover,
.tdpb-btn-primary:hover {
    background: var(--td-cta-deep, #B55B0D);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(254, 187, 2, 0.45);
}

.tdpb-intro-actions .tdpb-btn-intro {
    margin: 0;
}

.tdpb-btn-next:active,
.tdpb-btn-primary:active {
    background: #D99E00;
    transform: translateY(0);
}

.tdpb-btn-prev {
    background: transparent;
    color: #757575;
    border: 1px solid #BDBDBD;
}

.tdpb-btn-prev:hover {
    background: #F2F6FA;
    color: #424242;
    transform: none;
}

.tdpb-btn:disabled {
    background: #cbd5e1;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
    border-color: transparent;
}

/* ... existing code ... */

/* Mobile Sticky Footer (Intro only) */
@media (max-width: 767px) {
    .tdpb-intro-sticky .tdpb-step-1 {
        padding-bottom: 96px;
    }

    .tdpb-intro-sticky .tdpb-step-1 .tdpb-sticky-footer {
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        background: rgba(255, 255, 255, 0.96);
        padding: 12px 16px 16px;
        box-shadow: 0 -8px 18px rgba(15, 23, 42, 0.12);
        z-index: 999;
        display: flex;
        justify-content: center;
        border-top: 1px solid var(--tdpb-border);
    }

    .tdpb-intro-sticky .tdpb-step-1 .tdpb-intro-note {
        display: none;
    }

    .tdpb-intro-sticky .tdpb-step-1 .tdpb-sticky-footer .tdpb-btn {
        margin: 0;
        width: 100%;
        max-width: 420px;
    }
}

/* ========================================
   City Selection
   ======================================== */

.tdpb-city-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
    margin-top: 40px;
}

.tdpb-city-card {
    position: relative;
    cursor: pointer;
    border: 1px solid var(--tdpb-border);
    border-radius: var(--tdpb-radius);
    padding: 30px;
    text-align: center;
    transition: all 0.3s ease;
    background: #ffffff;
}

.tdpb-city-card:hover {
    border-color: var(--tdpb-accent);
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(11, 98, 185, 0.12);
}

.tdpb-city-card input[type="checkbox"] {
    position: absolute;
    opacity: 0;
}

.tdpb-city-card::before,
.tdpb-city-card::after {
    content: none;
}

.tdpb-city-card input[type="checkbox"]:checked + .tdpb-city-content {
    color: var(--tdpb-accent);
}

/* Selected city: clear blue border + soft blue fill (not just a tiny check) */
.tdpb-city-card:has(input[type="checkbox"]:checked) {
    border-color: var(--tdpb-accent);
    background: var(--tdpb-accent-soft);
    box-shadow: 0 0 0 1px var(--tdpb-accent);
}

/* Activities step: "City X of N" pager shown while paging one city at a time */
.tdpb-city-pager {
    margin: 0 0 16px;
    font-size: 13px;
    font-weight: 700;
    color: var(--tdpb-accent);
    text-align: center;
    letter-spacing: 0.02em;
}

.tdpb-city-content p {
    margin-top: 10px;
    margin-bottom: 0;
    font-size: var(--tdpb-size-body-sm);
    line-height: 22px;
}

.tdpb-city-card input[type="checkbox"]:checked ~ .tdpb-city-content::before {
    content: "\2713";
    position: absolute;
    top: -15px;
    right: -15px;
    width: 40px;
    height: 40px;
    background: var(--tdpb-accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-family: var(--tdpb-font-body);
    font-size: calc(var(--tdpb-size-body) + 1px);
    font-weight: 700;
    line-height: 1;
    z-index: 1;
}

.tdpb-city-content {
    position: relative;
}

.tdpb-city-content h3 {
    font-size: var(--tdpb-size-city-title);
    font-weight: 700;
    margin: 0;
    color: var(--tdpb-ink);
}

/* ========================================
   Activities Grid
   ======================================== */

.tdpb-activities-wrapper {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.tdpb-city-section {
    padding: 0 0 32px;
}

/* Prominent, numbered, sticky city banner — multi-city selections read clearly
   city-by-city (1 Bangkok → 2 Pattaya …) instead of one blurred-together list. */
.tdpb-city-section-title {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--tdpb-accent);
    color: #fff;
    font-size: 16px;
    font-weight: 800;
    letter-spacing: 0.2px;
    margin: 0 0 18px;
    padding: 13px 18px;
    border-radius: var(--tdpb-radius);
    position: sticky;
    top: 8px;
    z-index: 6;
    box-shadow: 0 3px 12px rgba(11, 98, 185, 0.18);
}
.tdpb-city-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: none;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #fff;
    color: var(--tdpb-accent);
    font-size: 14px;
    font-weight: 800;
}
.tdpb-city-count {
    margin-left: auto;
    font-size: 12.5px;
    font-weight: 600;
    opacity: 0.9;
}

.tdpb-city-empty {
    font-size: var(--tdpb-size-body-xs);
    color: var(--tdpb-ink-muted);
    margin: 0;
}

.tdpb-activities-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px; /* Increased gap for cleaner desktop layout */
    margin-bottom: 0;
}

.tdpb-activity-card {
    position: relative;
    cursor: pointer;
    border: 1px solid transparent; /* No border by default */
    border-radius: var(--tdpb-radius);
    overflow: hidden;
    transition: all 0.3s ease;
    background: #ffffff;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06); /* Soft shadow */
}

.tdpb-activity-card:hover {
    border-color: rgba(15, 23, 42, 0.12);
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.12);
}

.tdpb-activity-card.tdpb-card-error {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.18);
}

.tdpb-activity-card input[type="checkbox"] {
    position: absolute;
    top: 0;
    right: 0;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.tdpb-activity-check {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 22px;
    height: 22px;
    border: 2px solid var(--tdpb-border);
    border-radius: var(--tdpb-radius);
    background: #ffffff;
    color: transparent;
    font-size: 12px;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
    pointer-events: none;
}

.tdpb-activity-card.tdpb-selected .tdpb-activity-check {
    background: var(--tdpb-accent);
    border-color: var(--tdpb-accent);
    color: #ffffff;
    box-shadow: 0 0 0 3px rgba(var(--tdpb-accent-rgb), 0.2);
}

.tdpb-activity-card.tdpb-selected:not(.tdpb-card-error) {
    border-color: rgba(var(--tdpb-accent-rgb), 0.4);
    background-color: rgba(var(--tdpb-accent-rgb), 0.04);
}

.tdpb-activity-image {
    width: 100%;
    height: 200px;
    background-size: cover;
    background-position: center;
    background-color: #e2e8f0;
}

.tdpb-activity-content {
    padding: 20px;
}

.tdpb-activity-content h3 {
    font-size: var(--tdpb-size-body-sm);
    font-weight: 700;
    color: var(--tdpb-ink);
    margin: 0 0 10px 0;
}

.tdpb-activity-duration,
.tdpb-activity-city {
    font-size: var(--tdpb-size-body-xs);
    color: var(--tdpb-ink-muted);
    margin: 5px 0;
}

.tdpb-activity-variant {
    margin-top: 12px;
}

.tdpb-activity-selectors {
    display: none;
    margin-top: 12px;
    width: 100%;
    box-sizing: border-box;
}

.tdpb-activity-card.tdpb-selected .tdpb-activity-selectors {
    display: block;
}

.tdpb-activity-travelers {
    margin-top: 12px;
    display: grid;
    gap: 10px;
    width: 100%;
    box-sizing: border-box;
}

.tdpb-same-package {
    margin-top: 12px;
    padding: 12px;
    border: 1px dashed rgba(var(--tdpb-accent-rgb), 0.35);
    border-radius: var(--tdpb-radius);
    background: rgba(var(--tdpb-accent-rgb), 0.06);
    width: 100%;
    box-sizing: border-box;
}

.tdpb-same-toggle {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
    color: var(--tdpb-ink);
    cursor: pointer;
    user-select: none;
    position: relative;
    font-size: 14px;
}

.tdpb-same-toggle input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.tdpb-same-toggle-box {
    width: 18px;
    height: 18px;
    border: 2px solid var(--tdpb-accent);
    border-radius: var(--tdpb-radius);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 800;
    color: transparent;
    background: #ffffff;
    transition: all 0.2s ease;
    box-shadow: 0 1px 2px rgba(0,0,0,0.06);
}

.tdpb-use-same-package .tdpb-same-toggle-box {
    background: var(--tdpb-accent);
    color: #ffffff;
    box-shadow: 0 0 0 3px rgba(var(--tdpb-accent-rgb), 0.2);
}

.tdpb-same-toggle input:checked + .tdpb-same-toggle-box {
    background: var(--tdpb-accent);
    border-color: var(--tdpb-accent);
    color: #ffffff;
    box-shadow: 0 0 0 3px rgba(var(--tdpb-accent-rgb), 0.2);
}

.tdpb-same-select-row {
    margin-top: 12px;
    display: grid;
    gap: 6px;
    padding: 10px 12px;
    border: 1px solid rgba(var(--tdpb-accent-rgb), 0.25);
    border-radius: var(--tdpb-radius);
    background: #ffffff;
    width: 100%;
    box-sizing: border-box;
}

.tdpb-same-package-select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--tdpb-border);
    border-radius: var(--tdpb-radius);
    background: #ffffff;
    font-size: var(--tdpb-size-body-xs);
}

.tdpb-same-note {
    font-size: var(--tdpb-size-body-xxs);
    color: var(--tdpb-ink-muted);
}

.tdpb-traveler-row {
    display: grid;
    grid-template-columns: 110px 1fr;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border: 1px solid transparent;
    border-radius: var(--tdpb-radius);
    width: 100%;
    box-sizing: border-box;
}

.tdpb-traveler-label {
    font-size: var(--tdpb-size-label);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--tdpb-ink-muted);
}

.tdpb-traveler-select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--tdpb-border);
    border-radius: var(--tdpb-radius);
    background: #ffffff;
    font-size: var(--tdpb-size-body-xs);
}

.tdpb-traveler-row.tdpb-no-activity {
    border-color: #fca5a5;
    background: #fef2f2;
}

.tdpb-activity-card.tdpb-all-skip {
    border-color: #f87171;
    background: #fff1f2;
}

.tdpb-activity-card.tdpb-all-skip .tdpb-activity-content h3,
.tdpb-activity-card.tdpb-all-skip .tdpb-activity-duration,
.tdpb-activity-card.tdpb-all-skip .tdpb-activity-city {
    color: #991b1b;
}

.tdpb-no-activity-message {
    margin-top: 10px;
    padding: 10px 12px;
    border-radius: var(--tdpb-radius);
    background: #fef2f2;
    border: 1px solid #fca5a5;
    color: #991b1b;
    font-weight: 700;
    font-size: var(--tdpb-size-body-xxs);
}

.tdpb-activity-variant-label {
    display: block;
    font-size: var(--tdpb-size-label);
    font-weight: 600;
    color: var(--tdpb-ink-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 6px;
}

.tdpb-activity-variation,
.tdpb-activity-subpackage {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--tdpb-border);
    border-radius: var(--tdpb-radius);
    background: #ffffff;
    font-size: var(--tdpb-size-body-xs);
}

.tdpb-activity-showtime {
    margin-top: 12px;
}

.tdpb-showtime-select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--tdpb-border);
    border-radius: var(--tdpb-radius);
    background: #ffffff;
    font-size: var(--tdpb-size-body-xs);
}

.tdpb-activity-note {
    margin-top: 12px;
    padding: 10px 12px;
    border: 1px solid #fed7aa;
    border-radius: var(--tdpb-radius);
    background: #fff7ed;
    color: #92400e;
    font-size: var(--tdpb-size-body-xxs);
    line-height: 1.4;
}

/* Step 5 typography scale */
.tdpb-step-5 .tdpb-city-section-title {
    margin-bottom: 18px;
}

.tdpb-step-5 .tdpb-activities-grid {
    margin-top: 6px;
}

.tdpb-step-5 .tdpb-city-empty {
    font-size: var(--tdpb-size-activity-meta);
}

.tdpb-step-5 .tdpb-activity-content h3 {
    font-size: var(--tdpb-size-activity-title);
}

.tdpb-step-5 .tdpb-activity-duration,
.tdpb-step-5 .tdpb-activity-city {
    font-size: var(--tdpb-size-activity-meta);
}

.tdpb-step-5 .tdpb-activity-variant-label,
.tdpb-step-5 .tdpb-traveler-label {
    font-size: var(--tdpb-size-activity-label);
}

.tdpb-step-5 .tdpb-activity-variation,
.tdpb-step-5 .tdpb-activity-subpackage,
.tdpb-step-5 .tdpb-traveler-select {
    font-size: var(--tdpb-size-activity-input);
}

.tdpb-step-5 .tdpb-activity-note {
    font-size: var(--tdpb-size-activity-note);
}

/* ── Tidy, aligned activity cards (clean grid layout) ──────────────────
   Cards in a row are already equal-height (CSS grid). The ragged look
   comes from the variable-length "Important" note. Make each card a flex
   column, clamp long titles, cap the note height, and pin the note to the
   bottom so every card's note lines up across the row. */
.tdpb-step-5 .tdpb-activity-card {
    display: flex;
    flex-direction: column;
}
.tdpb-step-5 .tdpb-activity-image {
    flex-shrink: 0;
}
.tdpb-step-5 .tdpb-activity-content {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
}
.tdpb-step-5 .tdpb-activity-content h3 {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;          /* long titles -> max 2 lines, no overflow */
    overflow: hidden;
}
.tdpb-step-5 .tdpb-activity-note {
    max-height: 118px;              /* cap very long notes so cards stay uniform */
    overflow-y: auto;
}
.tdpb-step-5 .tdpb-activity-card:not(.tdpb-selected) .tdpb-activity-note {
    margin-top: auto;              /* pin to bottom -> notes align across the row */
}
.tdpb-step-5 .tdpb-activity-note::-webkit-scrollbar {
    width: 6px;
}
.tdpb-step-5 .tdpb-activity-note::-webkit-scrollbar-thumb {
    background: rgba(146, 64, 14, 0.25);
    border-radius: 3px;
}

/* ── Cleaner traveler / package picker inside a selected activity card ──
   (desktop only — mobile keeps its own compact layout). Stacks the small
   "Adult 1" label above a full-width dropdown so long package names fit,
   tones the label down from ALL-CAPS, and gives every dropdown one clean
   chevron with comfortable padding. */
@media (min-width: 768px) {
    .tdpb-step-5 .tdpb-traveler-row {
        grid-template-columns: 1fr;     /* stack label above the dropdown */
        gap: 6px;
        padding: 10px 0 0;
    }
    .tdpb-step-5 .tdpb-traveler-row.tdpb-no-activity {
        padding: 10px;                  /* keep the error state padded */
    }
    .tdpb-step-5 .tdpb-traveler-label {
        text-transform: none;           /* "Adult 1" instead of "ADULT 1" */
        letter-spacing: 0;
        font-weight: 600;
        color: #475569;
    }
    /* NOTE: page-templates/assets/style.css sets
       `.td-widget-host .tdpb-container select { padding/background ... !important }`.
       We raise specificity (+.tdpb-activity-content) AND use !important on just the
       properties we must win: room on the right + a custom chevron. */
    .tdpb-step-5 .tdpb-activity-content .tdpb-traveler-select,
    .tdpb-step-5 .tdpb-activity-content .tdpb-same-package-select,
    .tdpb-step-5 .tdpb-activity-content .tdpb-activity-variation,
    .tdpb-step-5 .tdpb-activity-content .tdpb-activity-subpackage {
        -webkit-appearance: none;
        appearance: none;
        width: 100%;
        cursor: pointer;
        line-height: 1.35;
        padding: 11px 40px 11px 14px !important;
        background-color: #fff !important;
        background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E") !important;
        background-repeat: no-repeat !important;
        background-position: right 14px center !important;
        background-size: 13px !important;
    }
}

/* ── Mobile (≤767px): fix the picker overflow + match the clean desktop layout ──
   The selectors block is `grid-column: 1 / -1` (already full width) yet ALSO had a
   negative margin + oversized width calc, making it ~80px too wide and shifted left;
   the card's `overflow:hidden` then clipped "Adult 1" and the dropdown. We neutralize
   that, stack the label above a full-width dropdown, and add the same chevron. */
@media (max-width: 767px) {
    .tdpb-step-5 .tdpb-activity-selectors {
        margin-left: 0;
        width: auto;
        max-width: 100%;
        box-sizing: border-box;
    }
    .tdpb-step-5 .tdpb-activity-content .tdpb-traveler-row {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 6px;
    }
    .tdpb-step-5 .tdpb-activity-content .tdpb-traveler-label {
        text-transform: none;
        letter-spacing: 0;
        color: #475569;
    }
    .tdpb-step-5 .tdpb-activity-content .tdpb-traveler-select,
    .tdpb-step-5 .tdpb-activity-content .tdpb-same-package-select,
    .tdpb-step-5 .tdpb-activity-content .tdpb-activity-variation,
    .tdpb-step-5 .tdpb-activity-content .tdpb-activity-subpackage {
        -webkit-appearance: none;
        appearance: none;
        width: 100%;
        min-width: 0;
        max-width: none;
        cursor: pointer;
        padding: 11px 40px 11px 14px !important;
        background-color: #fff !important;
        background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E") !important;
        background-repeat: no-repeat !important;
        background-position: right 14px center !important;
        background-size: 13px !important;
    }
}

/* ========================================
   Day Assignment
   ======================================== */

.tdpb-day-assignment {
    margin-bottom: 30px;
    margin-top: 30px;
}

.tdpb-day-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    margin-bottom: 15px;
    background: var(--tdpb-surface-muted);
    border-radius: var(--tdpb-radius);
    /*border-left: 4px solid var(--tdpb-accent);*/
    border: 1px solid #ededed;
}

.tdpb-day-activity strong {
    display: block;
    font-size: var(--tdpb-size-body);
    color: var(--tdpb-ink);
    margin-bottom: 5px;
}

.tdpb-activity-meta {
    font-size: var(--tdpb-size-body-xs);
    color: var(--tdpb-ink-muted);
}

.tdpb-day-select {
    /*display: flex;*/
    align-items: center;
    gap: 10px;
}

.tdpb-day-select label {
    font-size: var(--tdpb-size-label);
    font-weight: 600;
    padding-bottom: 14px;
    color: var(--tdpb-ink-soft);
}

.tdpb-day-select .tdpb-closed-note {
    margin-top: 6px;
    font-size: var(--tdpb-size-body-xs);
    color: #b42318;
    font-weight: 700;
}

.tdpb-day-selector {
    padding: 10px 15px;
    font-size: var(--tdpb-size-body);
    border: 2px solid var(--tdpb-border);
    border-radius: var(--tdpb-radius);
    background: #ffffff;
    cursor: pointer;
}

/* Show time selector in day assignment (Step 6) */
.tdpb-showtime-select-wrap {
    margin-top: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: rgba(var(--tdpb-accent-rgb), 0.05);
    border-radius: var(--tdpb-radius);
    border: 1px solid rgba(var(--tdpb-accent-rgb), 0.15);
}

.tdpb-showtime-select-wrap label {
    font-size: var(--tdpb-size-label);
    font-weight: 700;
    color: var(--tdpb-accent);
    white-space: nowrap;
}

.tdpb-showtime-select-wrap select {
    padding: 8px 12px;
    font-size: var(--tdpb-size-body);
    border: 2px solid var(--tdpb-border);
    border-radius: var(--tdpb-radius);
    background: #ffffff;
    cursor: pointer;
    min-width: 140px;
    font-weight: 600;
}

.tdpb-showtime-select-wrap select:focus {
    border-color: var(--tdpb-accent);
    outline: none;
    box-shadow: 0 0 0 3px rgba(var(--tdpb-accent-rgb), 0.15);
}

/* Step 6: a forgotten "Select time" dropdown is flagged red until the customer
   picks a time (cleared on change). The extra-specific first selector + the
   :focus variants ensure the red wins over the builder's day-row focus styling
   and stays red even while the field is focused after the auto-scroll. */
.tdpb-day-row .tdpb-day-showtime select.tdpb-showtime-selector.tdpb-field-error,
.tdpb-showtime-selector.tdpb-field-error,
.tdpb-showtime-selector.tdpb-field-error:focus,
.tdpb-showtime-selector.tdpb-field-error:focus-visible {
    border: 2px solid #D32F2F !important;
    background-color: #FFF5F5 !important;
    box-shadow: 0 0 0 3px rgba(211, 47, 47, 0.18) !important;
    color: #D32F2F !important;
    outline: none !important;
    font-weight: 700 !important;
}

/* ========================================
   Transport Selection
   ======================================== */

/* ========================================
   Taxi Selection
   ======================================== */

.tdpb-taxi-options {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 30px;
    margin-top: 30px;
}

.tdpb-taxi-all-toggle {
    padding: 14px 16px;
    border: 1px dashed rgba(var(--tdpb-accent-rgb), 0.3);
    border-radius: var(--tdpb-radius);
    background: rgba(var(--tdpb-accent-rgb), 0.08);
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.tdpb-taxi-all-toggle .tdpb-same-toggle {
    gap: 12px;
}

.tdpb-taxi-all-note {
    font-size: var(--tdpb-size-body-xxs);
    color: var(--tdpb-ink-muted);
}

.tdpb-taxi-card {
    border: 2px solid var(--tdpb-border);
    border-radius: var(--tdpb-radius);
    padding: 20px;
    background: #ffffff;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.tdpb-taxi-card.tdpb-taxi-enabled {
    border-color: var(--tdpb-accent);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

.tdpb-taxi-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.tdpb-taxi-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    color: var(--tdpb-ink);
    font-size: var(--tdpb-size-body-sm);
}

.tdpb-taxi-toggle input {
    width: 18px;
    height: 18px;
}

.tdpb-taxi-city-label {
    font-weight: 700;
    color: var(--tdpb-ink);
}

.tdpb-taxi-city-select {
    padding: 8px 12px;
    border: 2px solid var(--tdpb-border);
    border-radius: var(--tdpb-radius);
    background: #ffffff;
}

.tdpb-taxi-vehicle-select {
    padding: 14px 12px;
    border: 1px solid var(--tdpb-border);
    border-radius: var(--tdpb-radius);
    background: #ffffff;
    font-size: var(--tdpb-size-body-sm);
    font-weight: 600;
    /* A <select> sizes to its widest option by default; the long vehicle label
       ("Sedan (Capacity 1/3 • Up to 3 pax + 3 checked bags)") was forcing the card
       wider than the phone screen. Cap it to the container and let it shrink —
       without forcing full width, so the desktop inline layout is unchanged. */
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

.tdpb-taxi-capacity {
    font-size: var(--tdpb-size-body-xs);
    color: var(--tdpb-ink);
    font-weight: 600;
    flex: 1 1 100%;
    margin-top: 2px;
    line-height: 1.4;
    white-space: normal;
    word-break: break-word;
}

.tdpb-taxi-price {
    font-weight: 800;
    color: var(--tdpb-accent-strong);
    background: rgba(var(--tdpb-accent-rgb), 0.12);
    padding: 8px 14px;
    border-radius: 999px;
    font-size: var(--tdpb-size-body);
}

.tdpb-taxi-body {
    margin-top: 15px;
    display: grid;
    gap: 14px;
}

.tdpb-taxi-group-note {
    background: #f1f5f9;
    padding: 12px 14px;
    border-radius: var(--tdpb-radius);
    font-size: var(--tdpb-size-body-xs);
    color: #0f172a;
    font-weight: 700;
    margin-bottom: 12px;
    line-height: 1.5;
    white-space: normal;
    border: 1px solid #e2e8f0;
}

.tdpb-taxi-time {
    width: 100%;
    max-width: 100%;
    min-height: 52px;
    cursor: pointer;
}

.tdpb-taxi-time::-webkit-calendar-picker-indicator {
    cursor: pointer;
}

.tdpb-taxi-time-note {
    margin-top: 8px;
    font-size: var(--tdpb-size-body-xs);
    color: var(--tdpb-ink-soft);
    font-weight: 600;
}

.tdpb-taxi-location-note {
    margin-top: 6px;
    font-size: var(--tdpb-size-body-xxs);
    color: var(--tdpb-ink-muted);
    font-style: italic;
}

.tdpb-taxi-pricing {
    margin-top: 14px;
    padding: 14px;
    border-radius: var(--tdpb-radius);
    background: var(--tdpb-surface-muted);
    font-size: var(--tdpb-size-body-sm);
    color: var(--tdpb-ink);
    display: grid;
    gap: 8px;
    border: 1px solid var(--tdpb-border);
}

.tdpb-taxi-metric {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    padding: 6px 0;
}

.tdpb-taxi-metric-label {
    font-weight: 700;
    color: #0f172a;
    font-size: var(--tdpb-size-body-sm);
}

.tdpb-taxi-metric-value {
    font-weight: 700;
    color: var(--tdpb-ink);
    white-space: nowrap;
    font-size: var(--tdpb-size-body-sm);
}

/* Allow text wrapping on mobile for long capacity descriptions */
@media (max-width: 767px) {
    .tdpb-taxi-metric-value {
        white-space: normal;
        word-wrap: break-word;
        hyphens: auto;
    }
}

.tdpb-taxi-extra-inputs {
    margin-top: 12px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
}

.tdpb-taxi-extra-note {
    margin-top: 6px;
    font-size: var(--tdpb-size-body-xxs);
    color: var(--tdpb-ink-muted);
}

.tdpb-taxi-warning {
    margin-top: 10px;
    padding: 10px;
    border-radius: var(--tdpb-radius);
    background: #fff3cd;
    border: 1px solid #ffeeba;
    color: #856404;
    font-size: var(--tdpb-size-body-xxs);
}

.tdpb-taxi-note {
    margin-bottom: 20px;
    font-size: var(--tdpb-size-body-xs);
    color: var(--tdpb-ink-muted);
}

.tdpb-transport-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.tdpb-radio-card {
    position: relative;
    cursor: pointer;
    border: 3px solid var(--tdpb-border);
    border-radius: var(--tdpb-radius);
    padding: 30px;
    transition: all 0.3s ease;
    background: #ffffff;
}

.tdpb-radio-card:hover {
    border-color: var(--tdpb-accent);
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.tdpb-radio-card input[type="radio"] {
    position: absolute;
    opacity: 0;
}

.tdpb-radio-card input[type="radio"]:checked + .tdpb-radio-content {
    color: var(--tdpb-accent);
}

.tdpb-radio-card input[type="radio"]:checked ~ .tdpb-radio-content::before {
    content: "";
    position: absolute;
    top: -15px;
    right: -15px;
    width: 40px;
    height: 40px;
    background: var(--tdpb-accent);
    border-radius: 50%;
    display: block;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 18px 18px;
}

.tdpb-radio-content {
    position: relative;
}

.tdpb-radio-content h3 {
    font-size: var(--tdpb-size-body);
    font-weight: 700;
    color: var(--tdpb-ink);
    margin: 0 0 10px 0;
}

.tdpb-radio-content p {
    font-size: var(--tdpb-size-body-xs);
    color: var(--tdpb-ink-muted);
    margin: 0;
}

/* ========================================
   Review & Summary
   ======================================== */

.tdpb-review-summary {
    background: var(--tdpb-surface-muted);
    border-radius: var(--tdpb-radius);
    padding: 30px;
    margin-bottom: 30px;
}

.tdpb-summary-section {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--tdpb-border);
}

.tdpb-summary-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.tdpb-summary-section h4 {
    font-size: var(--tdpb-size-body);
    font-weight: 700;
    color: var(--tdpb-ink);
    margin: 0 0 10px 0;
}

.tdpb-summary-section p {
    font-size: var(--tdpb-size-body);
    color: var(--tdpb-ink-soft);
    margin: 5px 0;
}

.tdpb-summary-transport {
    background: #f8fafc;
    border: 1px dashed rgba(var(--tdpb-accent-rgb), 0.35);
    border-radius: var(--tdpb-radius);
    padding: 14px 16px;
}

.tdpb-summary-transport .tdpb-transport-note {
    font-size: var(--tdpb-size-body-xxs);
    color: var(--tdpb-ink-muted);
    margin-top: 6px;
}

.tdpb-activity-list {
    list-style: none;
    padding: 0;
    margin: 10px 0 0 0;
}

.tdpb-activity-list li {
    padding: 8px 0;
    font-size: var(--tdpb-size-body-sm);
    color: var(--tdpb-ink-soft);
}

.tdpb-summary-notes {
    background: #fff7ed;
    border: 1px solid #fed7aa;
    border-radius: var(--tdpb-radius);
    padding: 16px 20px;
}

.tdpb-summary-notes h4 {
    color: #92400e;
}

.tdpb-summary-notes .tdpb-activity-list li {
    color: #92400e;
}

.tdpb-final-price {
    text-align: center;
    padding: 40px;
    background: var(--tdpb-accent);
    border-radius: var(--tdpb-radius);
    color: #ffffff;
    margin-bottom: 30px;
}

.tdpb-final-price h3 {
    font-size: clamp(16px, 2vw, 18px);
    font-weight: 600;
    margin: 0 0 15px 0;
    opacity: 0.9;
    letter-spacing: 0.03em;
}

.tdpb-price-amount {
    font-size: var(--tdpb-size-price);
    font-weight: 700;
    margin: 0;
}

/* ========================================
   Loading & Error States
   ======================================== */

.tdpb-loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.tdpb-spinner {
    width: 60px;
    height: 60px;
    border: 6px solid #ffffff;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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



/*create my package button*/

/* ===============================
   INTRO CTA — flat site style (matches .td-btn gold buttons)
================================ */
.tdpb-btn.tdpb-btn-primary.tdpb-btn-intro.tdpb-btn-next {
  position: relative;
  padding: 14px 32px;
  font-size: 16px;
  font-weight: 700;
  color: #1a1a1a; /* dark text for contrast on brand yellow */
  background: #F0A028;
  border: none;
  border-radius: var(--tdpb-radius);
  cursor: pointer;
  white-space: nowrap;
  width: auto;
  box-shadow: none;
  transition: background 0.2s ease;
}

.tdpb-btn.tdpb-btn-primary.tdpb-btn-intro.tdpb-btn-next::before {
  content: none;
}

.tdpb-text {
  display: inline-block;
}

.tdpb-btn.tdpb-btn-primary.tdpb-btn-intro.tdpb-btn-next:hover {
  background: var(--td-cta-deep, #B55B0D);
    color: #fff;
}

/*end create my package*/

.tdpb-error {
    position: fixed;
    /* Centered in the MIDDLE of the viewport so it's unmissable and clears the
       sticky site header (which owns the top and its own stacking context). */
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: min(560px, calc(100vw - 32px));
    box-sizing: border-box;
    text-align: center;
    background: #C62828; /* was #e74c3c = 3.82:1 with white; #C62828 = 5.62:1 */
    color: #ffffff;
    padding: 15px 30px;
    border-radius: var(--tdpb-radius);
    font-size: var(--tdpb-size-body);
    font-weight: 600;
    box-shadow: 0 8px 28px rgba(231, 76, 60, 0.42);
    /* Very high so it beats the site header even from the root stacking context
       (showError() also re-parents it to <body> to guarantee this). */
    z-index: 2147483000;
}

/* Review Summary - New Card Layout */
.tdpb-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 10px;
}

.tdpb-summary-item {
    display: flex;
    flex-direction: column;
}

.tdpb-summary-item .label {
    font-size: var(--tdpb-size-kicker);
    font-weight: 700;
    text-transform: uppercase;
    color: var(--tdpb-ink-muted);
    letter-spacing: 0.05em;
    margin-bottom: 4px;
}

.tdpb-summary-item .value {
    font-size: var(--tdpb-size-body-sm);
    color: var(--tdpb-ink);
    font-weight: 500;
}

.tdpb-itinerary-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.tdpb-itinerary-day {
    background: #ffffff;
    border: 1px solid var(--tdpb-border);
    border-radius: var(--tdpb-radius);
    overflow: hidden;
}

.tdpb-day-header {
    background: var(--tdpb-surface-muted);
    padding: 12px 16px;
    font-size: var(--tdpb-size-kicker);
    font-weight: 700;
    color: var(--tdpb-accent-strong);
    border-bottom: 1px solid var(--tdpb-border);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.tdpb-itinerary-activity {
    padding: 16px;
    border-bottom: 1px solid var(--tdpb-border);
}

.tdpb-itinerary-activity:last-child {
    border-bottom: none;
}

.tdpb-activity-title {
    font-size: var(--tdpb-size-body);
    font-weight: 700;
    color: var(--tdpb-ink);
    margin-bottom: 8px;
}

.tdpb-traveler-breakdown {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.tdpb-traveler-breakdown li {
    font-size: var(--tdpb-size-body-xs);
    color: var(--tdpb-ink-soft);
    display: flex;
    align-items: flex-start;
    gap: 6px;
}

.tdpb-traveler-breakdown .t-label {
    font-weight: 600;
    color: var(--tdpb-ink-muted);
    min-width: 60px;
}

.tdpb-itinerary-empty {
    padding: 20px;
    text-align: center;
    color: var(--tdpb-ink-muted);
    font-style: italic;
    font-size: var(--tdpb-size-body-xs);
}

.tdpb-itinerary-taxi {
    padding: 12px 16px;
    background: #fffbeb; /* Light yellow/orange tint */
    border-top: 1px dashed var(--tdpb-border);
    font-size: var(--tdpb-size-body-xs);
    color: #92400e;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.tdpb-itinerary-taxi .taxi-icon {
    font-size: var(--tdpb-size-body);
}

.tdpb-itinerary-taxi .taxi-capacity {
    flex-basis: 100%;
    font-size: var(--tdpb-size-body-xxs);
    color: #92400e;
}

.tdpb-itinerary-taxi .taxi-location {
    flex-basis: 100%;
    font-size: var(--tdpb-size-body-xxs);
    color: #92400e;
    margin-top: 4px;
}

.tdpb-itinerary-taxi .taxi-extras {
    flex-basis: 100%;
    font-size: var(--tdpb-size-body-xxs);
    color: #b45309;
    margin-top: 4px;
}

/* ========================================
   Responsive Design
   ======================================== */

/* ========================================
   Responsive: Tablet (768px - 1199px)
   ======================================== */

@media (min-width: 768px) {
    .tdpb-intro-hero {
        display: grid;
        grid-template-columns: 1.2fr 0.8fr;
        gap: 24px;
        align-items: start;
    }

    .tdpb-intro-title {
        font-size: var(--tdpb-size-hero);
    }
    
    .tdpb-step-title {
        font-size: var(--tdpb-size-title);
    }

    .tdpb-intro-highlights {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }

    .tdpb-highlight {
        padding: 14px 16px;
        /* Keep flex-direction: row (default) for cleaner layout */
    }

    /* Remove icon bottom margin if side-by-side */
    .tdpb-highlight-icon {
        margin-bottom: 0;
    }

    .tdpb-btn-intro {
        width: auto;
        min-width: 240px;
        padding: 16px 32px;
    }

    .tdpb-intro-actions {
        align-items: flex-start;
    }

    .tdpb-intro-note {
        justify-content: flex-start;
    }

    .tdpb-flow-card {
        padding: 18px;
        box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
    }

    .tdpb-flow-link {
        display: none;
    }

    .tdpb-flow-list {
        display: grid;
        /*grid-template-columns: repeat(2, minmax(0, 1fr));*/
        gap: 10px 12px;
    }

    .tdpb-flow-badges {
        display: flex;
    }
}

@media (min-width: 1024px) {
    .tdpb-container {
        --tdpb-size-title: clamp(20px, 2.2vw, 28px);
    }

    .tdpb-step-kicker {
        font-size: 11px;
        letter-spacing: 0.12em;
    }
}

/* ========================================
   Responsive: Desktop (1200px+)
   ======================================== */

@media (min-width: 1200px) {
    .tdpb-intro-hero {
        grid-template-columns: 1.35fr 0.65fr;
        gap: 32px;
    }
    
     .tdpb-form-group label{
            font-size: var(--tdpb-size-label);
            text-transform: capitalize;
    }

    .tdpb-intro-title {
        font-size: var(--tdpb-size-hero);
    }

    .tdpb-intro-text {
        font-size: var(--tdpb-size-body);
    }

    .tdpb-intro-highlights {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 14px;
    }

    .tdpb-highlight {
        padding: 16px 18px;
    }

    .tdpb-btn-intro {
        font-size: var(--tdpb-size-button);
        padding: 18px 36px;
    }

    .tdpb-flow-card {
        padding: 20px;
    }

    .tdpb-flow-title {
        font-size: var(--tdpb-size-body-sm);
    }

    .tdpb-flow-summary {
        font-size: var(--tdpb-size-body-xs);
    }

    .tdpb-flow-list li {
        font-size: var(--tdpb-size-body-xxs);
    }
    
    /* Pax controls - wider on desktop */
    .tdpb-pax-controls {
        max-width: 800px;
        display: flex;
        flex-wrap: wrap;
    }
    
    .tdpb-pax-row {
        padding: 20px 28px;
        flex: 1 1 320px;
    }
    
    .tdpb-pax-summary {
        max-width: 600px;
        padding: 20px 28px;
    }
    
    .tdpb-counter-btn {
        width: 44px;
        height: 44px;
    }
    
    .tdpb-counter-input {
        width: 70px;
        height: 44px;
        font-size: var(--tdpb-size-body);
    }
}

/* ========================================
   Responsive: Mobile & General
   ======================================== */

@media (max-width: 767px) {
    .tdpb-container {
        padding: 24px 16px;
        border-radius: var(--tdpb-radius);
        --tdpb-size-body: 16px;
        --tdpb-size-body-sm: 14px;
        --tdpb-size-body-xs: 13px;
        --tdpb-size-body-xxs: 12px;
        --tdpb-size-kicker: 11px;
        --tdpb-size-label: 12px;
        --tdpb-size-button: 15px;
    }

    /* Fix Date Input: Make it look clickable and full */
    .tdpb-step-2 .tdpb-input {
        width: 100%;
        min-height: 50px; /* Larger touch target */
        background-color: #ffffff;
        -webkit-appearance: none; /* Remove default iOS styles */
        appearance: none;
        position: relative;
    }

    /* Ensure placeholder/value is visible */
    .tdpb-input[type="date"] {
        display: block;
        padding-right: 10px; /* Reset padding */
    }

    .tdpb-step-2 .tdpb-form-group {
        width: 100%;
        max-width: 100%;
    }

    .tdpb-step-2 .tdpb-total-days {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

    .tdpb-intro-hero {
        gap: 16px;
    }

    .tdpb-intro-title {
        font-size: var(--tdpb-size-hero);
    }

    .tdpb-intro-text {
        font-size: var(--tdpb-size-body);
    }

    .tdpb-intro-note {
        justify-content: center;
    }

    .tdpb-flow-card {
        padding: 14px;
    }

    .tdpb-step-title {
        font-size: var(--tdpb-size-title);
    }

    /* Pax controls - full width on mobile */
    .tdpb-pax-controls {
        max-width: 100%;
    }

    .tdpb-pax-row {
        padding: 16px;
        margin-bottom: 10px;
        gap: 16px; /* Reduced gap */
    }

    .tdpb-pax-summary {
        max-width: 100%;
        margin: 0 0 24px;
    }

    /* Step actions - side by side on mobile */
    .tdpb-step-actions {
        max-width: 100%;
        gap: 8px;
    }

    .tdpb-step-actions .tdpb-btn {
        flex: 1;
        padding: 14px 16px;
        font-size: var(--tdpb-size-button);
    }

    .tdpb-city-grid,
    .tdpb-activities-grid,
    .tdpb-transport-options {
        grid-template-columns: 1fr;
    }

    .tdpb-activities-grid {
        gap: 12px; /* Tighter gap for mobile */
    }

    /* COMPACT MOBILE ACTIVITY CARD (List Style) */
    .tdpb-activity-card {
        --tdpb-activity-thumb-size: 64px;
        --tdpb-activity-gap: 12px;
        --tdpb-activity-check-size: 24px;
        display: grid;
        grid-template-columns: var(--tdpb-activity-thumb-size) 1fr var(--tdpb-activity-check-size); /* Image | Content | Checkbox */
        grid-template-rows: auto auto; /* Main Info | Selectors */
        gap: var(--tdpb-activity-gap);
        align-items: start; /* Align to top so image doesn't float down */
        padding: 16px;
        text-align: left;
        min-height: auto;
    }

    .tdpb-activity-image {
        width: var(--tdpb-activity-thumb-size);
        height: var(--tdpb-activity-thumb-size);
        min-height: 0;
        border-radius: 50%; /* Circle */
        border: 2px solid var(--tdpb-surface-muted);
        grid-row: 1;
        grid-column: 1;
        margin: 0;
        margin-top: 4px; /* Optical alignment with title */
    }

    .tdpb-activity-content {
        padding: 0;
        min-width: 0;
        text-align: left;
        grid-row: 1;
        grid-column: 2;
        padding-bottom: 4px; /* Space before selectors */
    }

    .tdpb-activity-content h3 {
        font-size: var(--tdpb-size-activity-title);
        font-weight: 700;
        line-height: 1.3;
        margin: 0 0 4px 0;
    }

    .tdpb-activity-duration,
    .tdpb-activity-city {
        display: block;
        font-size: var(--tdpb-size-activity-meta);
        color: var(--tdpb-ink-muted);
        margin: 0;
        line-height: 1.4;
    }
    
    /* Checkbox */
    .tdpb-activity-card input[type="checkbox"] {
        /*position: static;*/
        width: var(--tdpb-activity-check-size);
        height: var(--tdpb-activity-check-size);
        grid-row: 1;
        grid-column: 3;
        margin: 0;
    }
    
    .tdpb-activity-variant-label{text-transform: none;font-size:11px !important;padding: 5px 5px 0px;}
    .tdpb-traveler-row.tdpb-no-activity{padding:5px;margin-bottom: 8px;}

    /* Selectors Container (Modern Block) */
    .tdpb-activity-selectors {
        grid-column: 1 / -1;
        grid-row: 2;
        margin: 12px 0 0;
        margin-left: calc(-1 * (var(--tdpb-activity-thumb-size) + var(--tdpb-activity-gap)));
        width: calc(100% + var(--tdpb-activity-thumb-size) + var(--tdpb-activity-check-size) + var(--tdpb-activity-gap) + var(--tdpb-activity-gap));
        background: #F8FAFC; /* Light Gray Container */
        padding: 16px;
        border-radius: var(--tdpb-radius);
        border: 1px solid var(--tdpb-border);
    }

    .tdpb-activity-travelers {
        margin-top: 0;
        display: flex;
        flex-direction: column;
        gap: 0; /* Remove gap, use padding/borders instead */
    }

    /* Individual Traveler Row */
    .tdpb-traveler-row {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 12px 0;
        border-bottom: 1px solid #e2e8f0; /* Separator line */
    }

    .tdpb-traveler-row:first-child {
        padding-top: 0;
    }

    .tdpb-traveler-row:last-child {
        padding-bottom: 0;
        border-bottom: none;
    }

    .tdpb-traveler-label {
        font-size: var(--tdpb-size-activity-label);
        font-weight: 600;
        color: var(--tdpb-ink-soft);
        flex-shrink: 0; /* Prevent label from shrinking */
    }

    /* Modern Dropdown */
    .tdpb-traveler-select {
        font-size: var(--tdpb-size-activity-input);
        color: #333333;
        padding: 8px 30px 8px 12px;
        width: auto; /* Let content determine width */
        min-width: 140px; /* Minimum tap target */
        max-width: 200px; /* Prevent overflow */
        min-height: 36px;
        background-color: #ffffff;
        border: 1px solid #cbd5e1;
        border-radius: var(--tdpb-radius);

        /* Text Handling */
        text-overflow: ellipsis;
        white-space: nowrap;
        overflow: hidden;
        text-align: left;

        /* Modern Arrow */
        appearance: none;
        -webkit-appearance: none;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
        background-repeat: no-repeat;
        background-position: right 10px center;
    }

    .tdpb-activity-note {
        font-size: var(--tdpb-size-activity-note);
        margin: 8px 0 0; 
        grid-column: 1 / -1;
    }

    .tdpb-day-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
        padding: 16px; /* Slightly reduced padding for smaller screens */
        margin-bottom: 12px; /* Slightly reduced margin */
    }

    .tdpb-day-activity {
        width: 100%; /* Ensure activity name takes full width */
    }

    .tdpb-day-activity strong {
        font-size: var(--tdpb-size-body-sm); /* Make activity title slightly smaller for mobile */
        margin-bottom: 4px; /* Reduce space below title */
    }

    .tdpb-activity-meta {
        font-size: var(--tdpb-size-body-xs); /* Ensure meta info is compact */
    }

    .tdpb-day-select {
        width: 100%;
        display: flex; /* Make it a flex container to control label and select */
        flex-direction: column; /* Stack label and select vertically */
        align-items: flex-start; /* Align label and select to the left */
        gap: 8px; /* Space between label and select */
    }

    .tdpb-day-select label {
        padding-bottom: 0; /* Remove excessive padding from label */
    }

    .tdpb-day-selector {
        flex: 1;
        width: 100%;
        min-height: 44px; /* Increase tap target size for easier interaction */
        padding: 10px 12px; /* Adjust padding for better fit */
        font-size: var(--tdpb-size-body-sm); /* Slightly smaller font for dropdown */
        border-width: 1px; /* Thinner border for cleaner look */
        appearance: none; /* Remove default arrow */
        -webkit-appearance: none; /* Remove default arrow for Webkit browsers */
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); /* Custom arrow for consistent look */
        background-repeat: no-repeat;
        background-position: right 12px center;
        background-size: 10px;
    }

    /* Mobile styles for show time selector in day assignment */
    .tdpb-showtime-select-wrap {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
        padding: 10px 12px;
        width: 100%;
    }

    .tdpb-showtime-select-wrap label {
        font-size: var(--tdpb-size-body-xs);
    }

    .tdpb-showtime-select-wrap select {
        width: 100%;
        min-height: 44px;
        font-size: var(--tdpb-size-body-sm);
    }

    .tdpb-btn {
        width: 100%;
        margin-right: 0;
        margin-bottom: 10px;
    }

    .tdpb-price-amount {
        font-size: var(--tdpb-size-price);
    }

    .tdpb-flow-link {
        display: none;
    }
}

@media (max-width: 480px) {
    .tdpb-input {
        max-width: 100%;
    }

    .tdpb-container {
        --tdpb-size-body: 15px;
        --tdpb-size-body-sm: 14px;
        --tdpb-size-body-xs: 12px;
        --tdpb-size-body-xxs: 11px;
        --tdpb-size-kicker: 10px;
        --tdpb-size-label: 11px;
        --tdpb-size-button: 14px;
    }
    
    .tdpb-form-group label{
            font-size: var(--tdpb-size-label);
            text-transform: capitalize;
            letter-spacing: normal;
    }

    .tdpb-activity-card {
        min-width: 100%;
    }
    
    .tdpb-pax-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    /*display: block;*/
    padding-bottom: 10px;
}



.tdpb-city-content p{    margin-top: 5px;}

.tdpb-review-summary{
    padding: 20px 0 0;
    background: transparent;
}

    /* Pax controls - intermediate sizing */
    .tdpb-pax-row {
        gap: 20px;
        padding: 18px 16px;
    }

    /* City cards */
    .tdpb-city-card {
        padding: 24px 20px;
    }

    .tdpb-city-grid {
        gap: 14px;
        margin-top: 24px;
        margin-bottom: 24px;
    }

    /* Taxi section */
    .tdpb-taxi-card {
        padding: 16px;
    }

    .tdpb-taxi-extra-inputs {
        grid-template-columns: 1fr;
    }

    /* Day assignment */
    .tdpb-day-assignment {
        margin-top: 20px;
        margin-bottom: 20px;
    }

    /* Review summary */
    .tdpb-summary-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .tdpb-itinerary-list {
        gap: 14px;
    }

    /* Final price */
    .tdpb-final-price {
        padding: 28px 20px;
    }

    /* Step styling */
    .tdpb-step {
        padding: 20px 16px;
    }

    .tdpb-step-subtitle {
        margin-bottom: 24px;
    }

    /* Activity cards */
    .tdpb-activities-grid {
        gap: 14px;
    }

    /* Transport options */
    .tdpb-transport-options {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .tdpb-radio-card {
        padding: 20px;
    }
}

@media (hover: hover) and (pointer: fine) {
    .tdpb-step:hover {
        box-shadow: 0 28px 60px rgba(15, 23, 42, 0.12);
        transform: translateY(-2px);
    }

    .tdpb-highlight:hover {
        border-color: var(--tdpb-accent);
        box-shadow: 0 10px 26px rgba(15, 23, 42, 0.12);
        transform: translateY(-2px);
    }

    .tdpb-flow-card:hover {
        border-color: var(--tdpb-accent);
        box-shadow: 0 16px 30px rgba(15, 23, 42, 0.12);
        transform: translateY(-2px);
    }
}

@media (max-width: 720px) {
    .tdpb-step-2 .tdpb-form-group {
        width: 100%;
        margin-right: 0;
    }
}

/* Trust Signals Layout Fix */
.tdpb-intro-note {
    font-size: var(--tdpb-size-body-xxs) !important;
    color: var(--tdpb-ink-muted) !important;
    margin: 12px 0 0 !important;
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 12px !important;
    justify-content: center !important;
    line-height: 1.4 !important;
    text-align: center !important;
}

@media (min-width: 768px) {
    .tdpb-intro-note {
        justify-content: flex-start !important;
        text-align: left !important;
    }
    .tdpb-step {
    display: none;
    animation: fadeIn 0.4s ease-in;
    background: var(--tdpb-surface);
    border-radius: var(--tdpb-radius);
    border: 1px solid rgba(15, 23, 42, 0.06);
    box-shadow: var(--tdpb-shadow);
    /*padding: 32px;*/
    padding: 20px;
    position: relative;
    z-index: 1;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}
}

/* Fix Date Input Overflow */
.tdpb-input {
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0;
    border: 1px solid #cbd5e1 !important;
    border-radius: var(--tdpb-radius) !important;
    padding: 14px 20px !important;
}

/* Fix Date Input: Click anywhere to open calendar (Desktop & Mobile) */
.tdpb-input[type="date"] {
    position: relative;
    cursor: pointer;
}

.tdpb-input[type="date"]::-webkit-calendar-picker-indicator {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 10;
}

/* Fix Time Input: Click anywhere to open time picker (Desktop & Mobile) */
.tdpb-input[type="time"] {
    position: relative;
    cursor: pointer;
}

.tdpb-input[type="time"]::-webkit-calendar-picker-indicator {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 10;
}

/* Ensure Safari Mobile looks correct */
@supports (-webkit-touch-callout: none) {
    .tdpb-input[type="date"] {
        -webkit-appearance: none;
        appearance: none;
        line-height: 1.2;
        padding-right: 14px !important;
        background-clip: padding-box;
    }

    .tdpb-input[type="time"] {
        -webkit-appearance: none;
        appearance: none;
        line-height: 1.2;
        padding-right: 14px !important;
        background-clip: padding-box;
    }
}

/* Mobile Datepicker - Native HTML5 Date Input */
.tdpb-date-input-mobile {
    cursor: pointer;
    background-color: #ffffff;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    font-family: var(--tdpb-font-body);
    font-size: var(--tdpb-size-body);
    color: var(--tdpb-ink);
    min-height: 52px;
    padding: 14px 16px;
    border: 1px solid var(--tdpb-border);
    border-radius: var(--tdpb-radius);
    background: #ffffff;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.tdpb-date-input-mobile:focus {
    outline: none;
    border-color: var(--tdpb-accent);
    box-shadow: 0 0 0 4px rgba(var(--tdpb-accent-rgb), 0.18);
}

/* Style the calendar icon for native date inputs */
.tdpb-date-input-mobile::-webkit-calendar-picker-indicator {
    cursor: pointer;
    opacity: 0.6;
    padding: 8px;
    margin-left: 8px;
}

.tdpb-date-input-mobile::-webkit-calendar-picker-indicator:hover {
    opacity: 1;
}

/* Desktop Datepicker (jQuery UI) */
.tdpb-date-input {
    cursor: pointer;
    background-color: #ffffff;
}

.ui-datepicker.tdpb-datepicker {
    font-family: var(--tdpb-font-body);
    background: #ffffff;
    border: 1px solid var(--tdpb-border);
    border-radius: var(--tdpb-radius);
    box-shadow: var(--tdpb-shadow);
    padding: 12px;
    z-index: 99999 !important;
    width: 320px;
    max-width: calc(100vw - 32px);
}

.ui-datepicker.tdpb-datepicker .ui-datepicker-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 8px;
    margin-bottom: 8px;
    border-bottom: 1px solid var(--tdpb-border);
    font-size: var(--tdpb-size-body-sm);
    color: var(--tdpb-ink);
}

.ui-datepicker.tdpb-datepicker .ui-datepicker-prev,
.ui-datepicker.tdpb-datepicker .ui-datepicker-next {
    width: 32px;
    height: 32px;
    border-radius: var(--tdpb-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--tdpb-ink);
    cursor: pointer;
    flex: 0 0 auto;
    position: relative;
    z-index: 2;
    touch-action: manipulation;
}

.ui-datepicker.tdpb-datepicker .ui-datepicker-prev:hover,
.ui-datepicker.tdpb-datepicker .ui-datepicker-next:hover {
    background: rgba(var(--tdpb-accent-rgb), 0.12);
}

.ui-datepicker.tdpb-datepicker .ui-datepicker-prev span,
.ui-datepicker.tdpb-datepicker .ui-datepicker-next span {
    display: none;
}

.ui-datepicker.tdpb-datepicker .ui-datepicker-prev::before {
    content: '‹';
    font-size: 18px;
}

.ui-datepicker.tdpb-datepicker .ui-datepicker-next::before {
    content: '›';
    font-size: 18px;
}

.ui-datepicker.tdpb-datepicker .ui-datepicker-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    flex: 1;
    font-weight: 600;
}

.ui-datepicker.tdpb-datepicker .ui-datepicker-title select {
    border: 1px solid var(--tdpb-border);
    border-radius: var(--tdpb-radius);
    padding: 4px 6px;
    font-size: var(--tdpb-size-body-xs);
    background: #ffffff;
    color: var(--tdpb-ink);
}

.ui-datepicker.tdpb-datepicker table {
    width: 100%;
    border-collapse: collapse;
}

.ui-datepicker.tdpb-datepicker th {
    font-size: var(--tdpb-size-body-xxs);
    color: var(--tdpb-ink-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 6px 0;
}

.ui-datepicker.tdpb-datepicker td {
    padding: 2px;
}

.ui-datepicker.tdpb-datepicker td a,
.ui-datepicker.tdpb-datepicker td span {
    display: block;
    text-align: center;
    border-radius: var(--tdpb-radius);
    padding: 8px 0;
    font-size: var(--tdpb-size-body-sm);
    color: var(--tdpb-ink);
}

.ui-datepicker.tdpb-datepicker td a:hover {
    background: rgba(var(--tdpb-accent-rgb), 0.14);
}

.ui-datepicker.tdpb-datepicker .ui-state-active {
    background: var(--tdpb-accent);
    color: #ffffff;
}

.ui-datepicker.tdpb-datepicker .ui-datepicker-today a {
    border: 1px solid rgba(var(--tdpb-accent-rgb), 0.4);
}

.ui-datepicker.tdpb-datepicker .ui-state-disabled span {
    color: var(--tdpb-ink-muted);
    background: #f1f5f9;
    opacity: 0.45;
    cursor: not-allowed;
}

/* Force pax counter values visible on mobile browsers.
   NOTE: no line-height / text-shadow here. The old `line-height: 34px !important`
   fought the 44px input height set by the ≤420px rule — on iOS WebKit that mismatch
   made the digit jump vertically ("dance") on every +/- tap while it re-laid-out the
   new value. `line-height: normal` (inherited from the base rule) centers stably. */
@media (max-width: 767px) {
    .tdpb-container .tdpb-step-3 .tdpb-counter-input {
        color: var(--tdpb-ink) !important;
        -webkit-text-fill-color: var(--tdpb-ink) !important;
        background-color: #ffffff !important;
        border-color: #cbd5e1 !important;
        font-size: var(--tdpb-size-body) !important;
        padding: 0 4px !important;
        opacity: 1 !important;
    }
}

@media (max-width: 420px) {
    #tdpb-package-builder {
        min-height: 100svh;
        min-height: 100dvh;
    }

    .tdpb-container {
        padding: 0;
        border-radius: var(--tdpb-radius);
        --tdpb-radius: 16px;
        box-shadow: 0 18px 44px rgba(15, 23, 42, 0.08);
    }

    .tdpb-step {
        padding: 20px 16px;
        border-radius: var(--tdpb-radius);
    }

    .tdpb-step-actions {
        flex-direction: column;
        gap: 10px;
        width: 100%;
    }

    .tdpb-step-actions .tdpb-btn,
    .tdpb-btn {
        width: 100%;
        min-height: 48px;
        margin-top: 12px;
    }

    .tdpb-input,
    .tdpb-taxi-vehicle-select,
    .tdpb-taxi-time,
    .tdpb-taxi-location,
    .tdpb-taxi-city-select {
        min-height: 48px;
    }

    .tdpb-counter-btn,
    .tdpb-counter-input {
        min-width: 44px;
        min-height: 44px;
        height: 44px;
    }

    .tdpb-counter-input {
        font-size: var(--tdpb-size-body);
    }

    .tdpb-activities-grid,
    .tdpb-city-grid,
    .tdpb-transport-options {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .tdpb-activity-card {
        padding: 10px;
        border-radius: var(--tdpb-radius);
    }

    .tdpb-activity-selectors {
        /*margin-left: -10px;*/
        margin-right: -10px;
        /*width: calc(100% + 20px);*/
        padding: 12px 10px;
        border-radius: 0 0 4px 4px;
    }

    .tdpb-taxi-options {
        gap: 16px;
    }

    .tdpb-taxi-card {
        padding: 16px;
        border-radius: var(--tdpb-radius);
    }

    .tdpb-taxi-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .tdpb-taxi-price {
        align-self: flex-start;
    }

    .tdpb-taxi-pricing {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .tdpb-form-group {
        margin-bottom: 14px;
    }

    /* Same package toggle - small screens */
    .tdpb-same-package {
        padding: 8px;
        margin-top: 10px;
        width: 100%;
        margin-bottom: 15px;
    }

    .tdpb-same-toggle {
        /*flex-wrap: wrap;*/
        gap: 8px;
        font-size: var(--tdpb-size-body-xs);
    }

    .tdpb-same-toggle > span:last-child {
        flex: 1 1 calc(100% - 30px);
        line-height: 1.3;
    }

    .tdpb-same-select-row {
        margin-top: 10px;
        padding: 8px;
        width: 100%;
    }

    .tdpb-activity-travelers {
        width: 100%;
        padding: 0;
    }

    /* Dropdowns - full width on small screens, no text truncation */
    .tdpb-same-package-select {
        width: 100%;
        min-width: 0;
        max-width: 100%;
        white-space: normal;
        text-overflow: clip;
        overflow: visible;
        height: auto;
        min-height: 44px;
        padding: 12px 14px;
        font-size: 14px;
    }

    .tdpb-activity-variant-label {
        font-size: 10px;
        margin-bottom: 4px;
    }

    /* Traveler rows - stack vertically on small screens */
    .tdpb-traveler-row {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 4px;
        padding: 8px 0;
        width: 100%;
    }

    .tdpb-traveler-label {
        font-size: 11px;
        text-align: left;
        font-weight: 600;
    }

    .tdpb-traveler-select {
        width: 100%;
        max-width: 100%;
        min-width: 0;
        white-space: normal;
        text-overflow: clip;
        overflow: visible;
        height: auto;
        min-height: 44px;
        padding: 12px 14px;
        font-size: 14px;
    }

    /* Pax controls - tighter on small screens */
    .tdpb-pax-row {
        flex-direction: column;
        gap: 12px;
        padding: 14px;
        align-items: stretch;
    }

    .tdpb-pax-info {
        text-align: center;
    }

    .tdpb-counter {
        justify-content: center;
    }

    /* City cards - compact on small screens */
    .tdpb-city-card {
        padding: 20px 16px;
    }

    .tdpb-city-content h3 {
        font-size: 16px;
    }

    .tdpb-city-content p {
        font-size: 13px;
    }

    .tdpb-city-card input[type="checkbox"]:checked ~ .tdpb-city-content::before {
        width: 32px;
        height: 32px;
        top: -10px;
        right: -10px;
        font-size: 14px;
    }

    /* Day assignment - compact */
    .tdpb-day-row {
        padding: 14px;
        gap: 12px;
    }

    .tdpb-day-activity strong {
        font-size: 14px;
    }

    /* Taxi section - compact */
    .tdpb-taxi-card {
        padding: 14px;
    }

    .tdpb-taxi-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .tdpb-taxi-toggle {
        font-size: 14px;
    }

    .tdpb-taxi-body {
        gap: 12px;
    }

    .tdpb-taxi-extra-inputs {
        grid-template-columns: 1fr;
    }

    .tdpb-taxi-all-toggle {
        padding: 12px;
    }

    .tdpb-taxi-location {
        min-height: 44px;
        font-size: 14px;
    }

    /* Review summary - compact */
    .tdpb-review-summary {
        padding: 16px;
        border-radius: var(--tdpb-radius);
    }

    .tdpb-summary-section {
        padding-bottom: 14px;
        margin-bottom: 14px;
    }

    .tdpb-summary-section h4 {
        font-size: 14px;
    }

    .tdpb-summary-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .tdpb-itinerary-day {
        border-radius: var(--tdpb-radius);
    }

    .tdpb-day-header {
        padding: 10px 12px;
        font-size: 10px;
    }

    .tdpb-itinerary-activity {
        padding: 12px;
    }

    .tdpb-activity-title {
        font-size: 14px;
    }

    .tdpb-traveler-breakdown li {
        font-size: 12px;
    }

    /* Final price - compact */
    .tdpb-final-price {
        padding: 24px 16px;
        border-radius: var(--tdpb-radius);
    }

    .tdpb-final-price h3 {
        font-size: 14px;
    }

    /* Step container - less padding */
    .tdpb-step {
        padding: 16px 14px;
    }

    .tdpb-step-title {
        font-size: 20px;
        margin-bottom: 12px;
    }

    .tdpb-step-subtitle {
        font-size: 14px;
        margin-bottom: 20px;
    }

    /* Total days display */
    .tdpb-total-days {
        padding: 14px 16px;
        flex-direction: column;
        gap: 4px;
        text-align: center;
    }

    /* Intro section - compact */
    .tdpb-intro-title {
        font-size: 22px;
    }

    .tdpb-intro-text {
        font-size: 14px;
    }

    .tdpb-highlight {
        padding: 12px;
    }

    .tdpb-highlight-icon {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }

    .tdpb-highlight-title {
        font-size: 13px;
    }

    .tdpb-highlight-text {
        font-size: 11px;
    }

    .tdpb-flow-card {
        padding: 12px;
    }

    .tdpb-flow-title {
        font-size: 14px;
    }

    /* Activity selectors container */
    .tdpb-activity-selectors {
        padding: 12px;
        /*margin-left: 0 !important;*/
        /*width: 100%;*/
        /*width: -webkit-fill-available;*/
        border-radius:14px;
    }
    
    

    /* Notes and warnings */
    .tdpb-activity-note {
        padding: 10px;
        font-size: 11px;
    }

    .tdpb-taxi-warning {
        font-size: 11px;
        padding: 10px;
    }

    .tdpb-no-activity-message {
        padding: 10px;
        font-size: 11px;
    }

    /* Loading and error states — centered in the middle of the screen on mobile */
    .tdpb-error {
        padding: 15px 20px;
        font-size: 15px;
        left: 12px;
        right: 12px;
        max-width: none;
        /* Keep vertical centering (top:50% from the base rule); only the Y offset
           is needed since left/right span the width. */
        transform: translateY(-50%);
        border-radius: var(--tdpb-radius);
    }
}

/* Extra small screens (360px and below - smallest phones) */
@media (max-width: 360px) {
    .tdpb-same-package {
        padding: 8px;
        margin-top: 8px;
    }

    .tdpb-same-toggle {
        font-size: 12px;
    }

    .tdpb-activity-selectors {
        padding: 10px;
    }

    .tdpb-same-note {
        font-size: 9px;
    }
}

/* ───────────── Save / resume itinerary by booking reference ───────────── */
.tdpb-ref-pill {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 12px;
    background: var(--tdpb-accent-soft);
    border: 1px solid var(--tdpb-border);
    border-left: 4px solid var(--tdpb-accent);
    border-radius: var(--tdpb-radius);
    padding: 12px 18px;
    margin: 0 0 16px;
    font-family: var(--tdpb-font-body);
    font-size: var(--tdpb-size-body-sm);
    color: var(--tdpb-ink);
}
.tdpb-ref-pill-label { font-weight: 800; white-space: nowrap; }
.tdpb-ref-pill-code {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-weight: 800;
    font-size: 16px;
    letter-spacing: .1em;
    color: var(--tdpb-accent-strong);
    background: #fff;
    border: 1px solid var(--tdpb-accent);
    border-radius: 8px;
    padding: 4px 12px;
    white-space: nowrap;
}
.tdpb-ref-pill-copy {
    border: 1px solid var(--tdpb-accent);
    background: #fff;
    color: var(--tdpb-accent);
    font-weight: 700;
    font-size: 12.5px;
    border-radius: 999px;
    padding: 5px 14px;
    cursor: pointer;
}
.tdpb-ref-pill-copy:hover { background: var(--tdpb-accent); color: #fff; }
.tdpb-ref-pill-note { color: var(--tdpb-ink-muted); font-size: 12.5px; }

/* Resume box (intro step) */
.tdpb-resume-box {
    margin-top: 18px;
    padding: 16px 18px;
    background: var(--tdpb-surface-muted);
    border: 1px dashed var(--tdpb-border);
    border-radius: var(--tdpb-radius);
}
.tdpb-resume-box-label {
    display: block;
    font-size: var(--tdpb-size-body-xs);
    font-weight: 600;
    color: var(--tdpb-ink-soft);
    margin-bottom: 10px;
}
.tdpb-resume-box-row { display: flex; gap: 10px; flex-wrap: wrap; }
.tdpb-resume-box-row .tdpb-input {
    flex: 1 1 200px;
    text-transform: uppercase;
    letter-spacing: .06em;
}
.tdpb-resume-box-msg { margin: 8px 0 0; font-size: 13px; min-height: 1em; }
.tdpb-resume-box-msg.is-error { color: #B42318; }
.tdpb-resume-box-msg.is-ok { color: #067647; }

/* Secondary button (outline blue) — used by resume + email actions */
.tdpb-btn-secondary {
    background: #fff;
    color: var(--tdpb-accent);
    border: 2px solid var(--tdpb-accent);
    border-radius: 999px;
    font-weight: 700;
    padding: 10px 20px;
    cursor: pointer;
}
.tdpb-btn-secondary:hover { background: var(--tdpb-accent-soft); }

/* Reference block (review step) — prominent, highlighted, mobile-safe */
.tdpb-ref-save {
    margin-top: 20px;
    padding: 22px 20px;
    background: var(--tdpb-accent-soft);
    border: 2px solid var(--tdpb-accent);
    border-radius: 16px;
    text-align: center;
    box-shadow: 0 3px 14px rgba(var(--tdpb-accent-rgb), 0.12);
}
.tdpb-ref-save-label {
    margin: 0 0 10px;
    font-weight: 800;
    font-size: var(--tdpb-size-body-sm);
    color: var(--tdpb-ink);
}
.tdpb-ref-code-row {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 12px;
}
.tdpb-ref-bigcode {
    display: inline-block;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-weight: 800;
    font-size: 26px;
    letter-spacing: .12em;
    color: var(--tdpb-accent-strong);
    background: #fff;
    border: 2px solid var(--tdpb-accent);
    border-radius: 12px;
    padding: 8px 20px;
    white-space: nowrap;
    line-height: 1.1;
}
.tdpb-ref-copy {
    border: 2px solid var(--tdpb-accent);
    background: #fff;
    color: var(--tdpb-accent);
    font-weight: 800;
    font-size: 14px;
    border-radius: 999px;
    padding: 8px 20px;
    cursor: pointer;
    white-space: nowrap;
}
.tdpb-ref-copy:hover { background: var(--tdpb-accent); color: #fff; }
.tdpb-ref-save-sub { margin: 0 auto 14px; font-size: 14px; color: var(--tdpb-ink-soft); max-width: 560px; }
.tdpb-ref-save-sub a { color: var(--tdpb-accent); font-weight: 700; }
.tdpb-ref-email-row { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; max-width: 560px; margin: 0 auto; }
.tdpb-ref-email-row .tdpb-input { flex: 1 1 240px; }
.tdpb-ref-email-msg { margin: 8px 0 0; font-size: 13px; min-height: 1em; }
.tdpb-ref-email-msg.is-error { color: #B42318; }
.tdpb-ref-email-msg.is-ok { color: #067647; }
@media (max-width: 560px) {
    .tdpb-ref-save { padding: 18px 14px; }
    .tdpb-ref-bigcode { font-size: 22px; letter-spacing: .1em; padding: 8px 16px; }
    .tdpb-resume-box-row .tdpb-btn-secondary,
    .tdpb-ref-email-row .tdpb-btn-secondary { width: 100%; }
    .tdpb-ref-email-row .tdpb-input { flex: 1 1 100%; }
}

/* ───────── Activities step: live 3-activity minimum counter ───────── */
.tdpb-activity-counter {
    position: sticky;
    top: 8px;
    z-index: 5;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 18px;
    border-radius: var(--tdpb-radius);
    margin: 0 0 18px;
    font-size: var(--tdpb-size-body-sm);
    border: 1px solid var(--tdpb-border);
    box-shadow: var(--tdpb-shadow);
}
.tdpb-activity-counter .tdpb-ac-icon { font-size: 20px; flex: 0 0 auto; line-height: 1; }
.tdpb-activity-counter .tdpb-ac-text { flex: 1 1 auto; }
.tdpb-activity-counter .tdpb-ac-count {
    flex: 0 0 auto;
    font-weight: 800;
    padding: 4px 12px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid var(--tdpb-border);
    white-space: nowrap;
}
.tdpb-activity-counter.is-incomplete { background: #FFF7E6; border-color: #F3D27A; color: #7A5200; }
.tdpb-activity-counter.is-incomplete .tdpb-ac-count { color: #7A5200; border-color: #F3D27A; }
.tdpb-activity-counter.is-complete { background: #E7F6EC; border-color: #9FD8B4; color: #075E2E; }
.tdpb-activity-counter.is-complete .tdpb-ac-count { color: #075E2E; border-color: #9FD8B4; }
@media (max-width: 560px) {
    .tdpb-activity-counter { flex-wrap: wrap; gap: 8px; padding: 10px 14px; }
    .tdpb-activity-counter .tdpb-ac-count { order: 3; }
}

/* ── Per-activity hotel-transfer taxi (e.g. Safari World) ── */
.tdpb-activity-taxi {
    margin-top: 12px;
    padding: 10px 12px;
    border: 1px solid #CFE0FF;
    border-radius: var(--tdpb-radius);
    background: #EDF4FB;
}
.tdpb-activity-taxi-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-weight: 600;
    color: #0c1324;
    font-size: var(--tdpb-size-body-xxs);
}
/* The card hides its own selection checkbox (absolute 1px, opacity 0, pointer-events
   none) — the taxi checkbox must escape that rule and render as a REAL visible box. */
.tdpb-activity-card input[type="checkbox"].tdpb-activity-taxi-check,
.tdpb-activity-taxi-check {
    position: static;
    top: auto;
    right: auto;
    width: 18px;
    height: 18px;
    opacity: 1;
    pointer-events: auto;
    accent-color: #0B62B9;
    flex: 0 0 auto;
    margin: 0;
    cursor: pointer;
}
.tdpb-activity-taxi-opt {
    margin-left: auto;
    padding: 2px 8px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid #CFE0FF;
    color: #0B62B9;
    font-size: 11px;
    font-weight: 600;
    flex: 0 0 auto;
}
.tdpb-activity-taxi-price {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    flex: 1 1 100%;
    margin-top: 8px;
    padding-left: 26px;
    font-weight: 400;
    color: #475569;
    font-size: var(--tdpb-size-body-xxs);
    line-height: 1.45;
}

/* The fare leads as a badge — scannable at a glance on any device. */
.tdpb-taxi-fare {
    flex: 0 0 auto;
    padding: 3px 11px;
    border-radius: 999px;
    background: #0B62B9;
    color: #fff;
    font-weight: 800;
    font-size: 13px;
    letter-spacing: 0.2px;
    white-space: nowrap;
}

.tdpb-taxi-fare--on {
    background: #0f766e;
}

.tdpb-taxi-fare-note {
    flex: 1 1 auto;
    min-width: 0;
    color: #475569;
    font-weight: 500;
    overflow-wrap: anywhere;
    word-break: break-word;
}

/* Whole panel brightens when the taxi is added (progressive — old browsers
   without :has simply keep the resting style). */
.tdpb-activity-taxi:has(.tdpb-activity-taxi-check:checked) {
    border-color: #0B62B9;
    background: #E3EEFB;
    box-shadow: 0 0 0 2px rgba(11, 98, 185, 0.12);
}

@media (max-width: 640px) {
    .tdpb-activity-taxi-price {
        padding-left: 0;
        margin-top: 10px;
    }

    .tdpb-taxi-fare {
        font-size: 14px;
        padding: 4px 12px;
    }
}

/* ── Review-step editing: remove activity / add more ── */
.tdpb-activity-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}
.tdpb-activity-title-row .tdpb-activity-title { flex: 1 1 auto; }
.tdpb-review-remove {
    flex: 0 0 auto;
    background: #fff;
    border: 1px solid #fecaca;
    color: #b91c1c;
    border-radius: 999px;
    padding: 3px 10px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    line-height: 1.4;
}
.tdpb-review-remove:hover { background: #fef2f2; }
.tdpb-review-addmore {
    display: block;
    width: 100%;
    margin-top: 12px;
    padding: 11px 16px;
    background: #EDF4FB;
    border: 1px dashed #0B62B9;
    color: #0B62B9;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}
.tdpb-review-addmore:hover { background: #e0edf9; }

/* ==================================================================
   Hotels step (v1.0.375) — per-city search cards + review section
   ================================================================== */
.tdpb-hotel-options {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.tdpb-hotel-card {
    border: 2px solid var(--tdpb-border);
    border-radius: var(--tdpb-radius);
    padding: 20px;
    background: #ffffff;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.tdpb-hotel-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 17px;
    cursor: pointer;
}

.tdpb-hotel-toggle input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #0f766e;
    flex: 0 0 auto;
}

.tdpb-hotel-body {
    margin-top: 16px;
}

.tdpb-hotel-controls {
    display: grid;
    grid-template-columns: 1fr 1fr 90px auto;
    gap: 12px;
    align-items: end;
}

.tdpb-hotel-field label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: #6b7280;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.tdpb-hotel-search-btn {
    white-space: nowrap;
}

.tdpb-hotel-chosen {
    margin-top: 12px;
    padding: 10px 14px;
    border-radius: 10px;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #166534;
    font-size: 14px;
}

.tdpb-hotel-chosen-price {
    font-weight: 800;
}

.tdpb-hotel-chosen-hint {
    color: #6b7280;
    font-size: 12px;
}

.tdpb-hotel-msg {
    margin: 14px 0 6px;
    font-size: 14px;
    color: #374151;
}

.tdpb-hotel-msg-error {
    color: #b91c1c;
}

.tdpb-hotel-result {
    border: 1px solid var(--tdpb-border);
    border-radius: 12px;
    padding: 14px;
    margin-top: 12px;
    background: #fafafa;
}

.tdpb-hotel-result-head {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.tdpb-hotel-photo {
    width: 76px;
    height: 58px;
    object-fit: cover;
    border-radius: 8px;
    flex: 0 0 auto;
}

.tdpb-hotel-name {
    font-weight: 700;
    font-size: 15px;
    color: #111827;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.tdpb-hotel-stars {
    color: #f59e0b;
    font-size: 13px;
    letter-spacing: 1px;
}

.tdpb-hotel-address {
    font-size: 12px;
    color: #6b7280;
    margin-top: 2px;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.tdpb-hotel-offers {
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.tdpb-hotel-offer {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border: 1.5px solid var(--tdpb-border);
    border-radius: 10px;
    background: #fff;
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.tdpb-hotel-offer:hover {
    border-color: #0f766e;
}

.tdpb-hotel-offer input[type="radio"] {
    width: 17px;
    height: 17px;
    accent-color: #0f766e;
    flex: 0 0 auto;
}

.tdpb-hotel-offer:has(input:checked) {
    border-color: #0f766e;
    box-shadow: 0 0 0 2px rgba(15, 118, 110, 0.15);
    background: #f0fdfa;
}

.tdpb-hotel-offer-info {
    flex: 1 1 auto;
    min-width: 0;
}

.tdpb-hotel-offer-room {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #1f2937;
    /* Supplier room names carry long unbreakable tokens ("ROOM...WHEELCHAIR")
       that otherwise paint outside this flex item and over the price. */
    overflow-wrap: anywhere;
    word-break: break-word;
}

.tdpb-hotel-offer-cancel {
    display: block;
    font-size: 12px;
    margin-top: 2px;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.tdpb-hotel-offer-cancel.is-refundable {
    color: #15803d;
}

.tdpb-hotel-offer-cancel.is-nonref {
    color: #b45309;
}

.tdpb-hotel-offer-price {
    font-weight: 800;
    font-size: 15px;
    color: #0f766e;
    text-align: right;
    white-space: nowrap;
}

.tdpb-hotel-offer-price small {
    display: block;
    font-weight: 500;
    color: #6b7280;
    font-size: 11px;
}

.tdpb-hotel-note p {
    font-size: 13px;
    color: #6b7280;
    margin: 14px 0 0;
}

/* Review-step hotel lines */
/* Reserve the lane the absolutely-positioned price occupies, so a long hotel
   name can never run underneath it. */
.tdpb-summary-hotels .tdpb-review-hotel {
    border: 1px solid var(--tdpb-border);
    border-radius: 10px;
    padding: 12px 14px;
    padding-right: 100px;
    margin-bottom: 10px;
    position: relative;
    background: #fff;
}

.tdpb-review-hotel-name {
    font-weight: 700;
    font-size: 15px;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.tdpb-review-hotel-city {
    font-size: 12px;
    color: #6b7280;
    font-weight: 500;
    margin-left: 6px;
}

.tdpb-review-hotel-detail {
    font-size: 13px;
    color: #374151;
    margin-top: 3px;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.tdpb-review-hotel-cancel {
    font-size: 12px;
    margin-top: 2px;
}

.tdpb-review-hotel-cancel.is-refundable { color: #15803d; }
.tdpb-review-hotel-cancel.is-nonref { color: #b45309; }

.tdpb-review-hotel-price {
    position: absolute;
    top: 12px;
    right: 14px;
    font-weight: 800;
    color: #0f766e;
}

.tdpb-review-hotel-note {
    font-size: 12px;
    color: #6b7280;
    margin-top: 4px;
}

@media (max-width: 640px) {
    .tdpb-hotel-controls {
        grid-template-columns: 1fr 1fr;
    }

    .tdpb-hotel-search-btn {
        grid-column: 1 / -1;
    }

    /* Phones: the room name gets the full row and the price drops onto its own
       right-aligned line underneath. Side-by-side squeezes the name into ~100px,
       which wrapped supplier room names to five lines and painted them over
       the price. */
    .tdpb-hotel-offer {
        flex-wrap: wrap;
        row-gap: 6px;
    }

    /* Take whatever remains on the first line (after the radio and the
       optional room thumbnail); the 100%-basis price then wraps below. */
    .tdpb-hotel-offer-info {
        flex: 1 1 0;
        min-width: 0;
    }

    .tdpb-hotel-offer-price {
        flex: 1 1 100%;
        margin-left: 27px;
        font-size: 14px;
        display: flex;
        align-items: baseline;
        justify-content: flex-end;
        gap: 8px;
    }

    .tdpb-hotel-offer-price small {
        display: inline;
    }

    /* Same reason on the review card: price returns to normal flow as its own
       right-aligned line instead of sitting on top of the hotel name. */
    .tdpb-summary-hotels .tdpb-review-hotel {
        padding-right: 14px;
    }

    .tdpb-review-hotel-price {
        position: static;
        display: block;
        text-align: right;
        margin-top: 4px;
    }
}

.tdpb-hotel-range-hint {
    margin-top: 8px;
    font-size: 12px;
    color: #6b7280;
    background: #f9fafb;
    border-left: 3px solid #d1d5db;
    border-radius: 0;
    padding: 6px 10px;
}

.tdpb-hotel-range-hint.tdpb-hotel-range-warn {
    color: #92400e;
    background: #fffbeb;
    border-left-color: #f59e0b;
}

/* ==================================================================
   Hotel photos: gallery strip, room chips, offer thumbnails, lightbox
   ================================================================== */
.tdpb-hotel-photos-btn {
    margin-top: 6px;
    padding: 4px 12px;
    font-size: 12px;
    font-weight: 700;
    color: #0f766e;
    background: #f0fdfa;
    border: 1.5px solid #99f6e4;
    border-radius: 999px;
    cursor: pointer;
}

.tdpb-hotel-photos-btn:hover {
    background: #ccfbf1;
}

.tdpb-hotel-gallery {
    margin-top: 10px;
}

.tdpb-hotel-gallery-strip {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding: 4px 0 8px;
}

.tdpb-hotel-gallery-item {
    width: 108px;
    height: 76px;
    object-fit: cover;
    border-radius: 8px;
    flex: 0 0 auto;
    cursor: pointer;
    background: #e5e7eb;
}

.tdpb-hotel-gallery-room {
    flex: 0 0 auto;
    width: 108px;
}

.tdpb-hotel-gallery-room .tdpb-hotel-gallery-item {
    width: 108px;
}

.tdpb-hotel-gallery-label {
    display: block;
    font-size: 11px;
    color: #374151;
    margin-top: 3px;
    width: 108px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tdpb-hotel-gallery-roomshead {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: #6b7280;
    margin-top: 4px;
}

.tdpb-hotel-offer-thumb {
    width: 52px;
    height: 42px;
    object-fit: cover;
    border-radius: 6px;
    flex: 0 0 auto;
    cursor: zoom-in;
    background: #e5e7eb;
}

#tdpb-hotel-lightbox {
    position: fixed;
    inset: 0;
    z-index: 999999;
    background: rgba(15, 23, 42, 0.88);
    display: flex;
    align-items: center;
    justify-content: center;
}

#tdpb-hotel-lightbox .tdpb-lb-img {
    max-width: 92vw;
    max-height: 78vh;
    border-radius: 10px;
    object-fit: contain;
}

#tdpb-hotel-lightbox .tdpb-lb-caption {
    position: absolute;
    bottom: 22px;
    left: 0;
    right: 0;
    text-align: center;
    color: #fff;
    font-size: 13px;
    text-shadow: 0 1px 3px rgba(0,0,0,0.6);
    padding: 0 16px;
}

#tdpb-hotel-lightbox .tdpb-lb-close,
#tdpb-hotel-lightbox .tdpb-lb-prev,
#tdpb-hotel-lightbox .tdpb-lb-next {
    position: absolute;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 0;
    background: rgba(255,255,255,0.16);
    color: #fff;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

#tdpb-hotel-lightbox .tdpb-lb-close { top: 16px; right: 16px; }
#tdpb-hotel-lightbox .tdpb-lb-prev { left: 10px; top: 50%; transform: translateY(-50%); }
#tdpb-hotel-lightbox .tdpb-lb-next { right: 10px; top: 50%; transform: translateY(-50%); }

#tdpb-hotel-lightbox .tdpb-lb-close:hover,
#tdpb-hotel-lightbox .tdpb-lb-prev:hover,
#tdpb-hotel-lightbox .tdpb-lb-next:hover {
    background: rgba(255,255,255,0.3);
}

@media (max-width: 640px) {
    .tdpb-hotel-gallery-item,
    .tdpb-hotel-gallery-room,
    .tdpb-hotel-gallery-label {
        width: 92px;
    }

    .tdpb-hotel-gallery-item {
        height: 66px;
    }

    .tdpb-hotel-offer-thumb {
        width: 46px;
        height: 38px;
    }
}

/* Visually-hidden label utility (WCAG 1.3.1) — the fields it serves were
   placeholder-only, which disappears on focus and is not a label. */
.tdpb-sr-only {
    position: absolute !important;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0, 0, 0, 0);
    white-space: nowrap; border: 0;
}
/* the step wrapper receives focus on step change — do not paint a stray ring */
.tdpb-step:focus { outline: none; }
.tdpb-step-title:focus-visible { outline: 3px solid #B5720D; outline-offset: 3px; }

/* ==================================================================
   Trip-date flatpickr — identical look to the activity pages' calendar
   (phone sizing: 44px touch cells, full-width panel, disabled days
   visibly struck out). The calendar is appended to <body>.
   ================================================================== */
@media (max-width: 640px) {
    .flatpickr-calendar.open {
        width: min(346px, calc(100vw - 24px)) !important;
        max-width: calc(100vw - 24px) !important;
    }

    .flatpickr-calendar.open .flatpickr-days,
    .flatpickr-calendar.open .dayContainer {
        width: 100% !important;
        min-width: 0 !important;
        max-width: none !important;
    }

    .flatpickr-calendar.open .flatpickr-day {
        max-width: none !important;
        height: 44px !important;
        line-height: 44px !important;
        font-size: 15px !important;
    }

    .flatpickr-calendar.open .flatpickr-weekday {
        font-size: 12px !important;
    }

    .flatpickr-calendar.open .flatpickr-day.flatpickr-disabled,
    .flatpickr-calendar.open .flatpickr-day.prevMonthDay.flatpickr-disabled {
        color: rgba(15, 39, 64, .26) !important;
        text-decoration: line-through;
    }
}
