/* =========================================================
   Touravel Filters + Results (NO ASP) - CLEAN
   - Scoped to Touravel classes
   - Responsive units (%, vw, vh, em)
   ========================================================= */

/* ---------- Break out of boxed theme/container ---------- */
/* Add class "tv-filters-section" to the Elementor SECTION that contains [touravel_filters] */
section.tv-filters-section{
  position: relative !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  width: 90vw !important;
  max-width: 90vw !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}

section.tv-filters-section > .elementor-container{
  width: 100% !important;
  max-width: 100% !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}

/* ---------- Main layout ---------- */
.tv-layout{
  width: 100% !important;
  max-width: 100% !important;
  margin: -12px auto 0 !important;

  display: grid !important;
  grid-template-columns: minmax(245px, 22%) minmax(0, 1fr) !important;
  column-gap: 18px !important;
  align-items: start !important;
}

.tv-layout,
.tv-layout *,
.ta-tripbar,
.ta-tripbar *{
  box-sizing: border-box;
}

.tv-filters,
.tv-results,
#tv-results-list,
.tv-result-wrap{
  min-width: 0;
  max-width: 100%;
}

@media (max-width: 60em){
  .tv-layout{
    grid-template-columns: 100% !important;
    row-gap: 8px !important;
  }
}

/* ---------- Filters column ---------- */
.tv-filters{
  background: #fff;
  border: 0.10% solid rgba(0,0,0,0.10);
  border-radius: 1.2%;
  padding: 2%;
}

.tv-filter-toggle{
  display: none;
}

@media (min-width: 60em){
  .tv-filters{
    position: sticky !important;
    top: 12vh !important;
    align-self: start !important;
    z-index: 50;
  }
}

@media (max-width: 60em){
  .tv-filters{
    padding: 10px 12px;
    border: 1px solid rgba(15,23,42,0.10);
    border-radius: 8px;
  }

  .tv-filter-toggle{
    width: 100%;
    min-height: 42px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 9px 12px;
    border: 1px solid #d7dee8;
    border-radius: 8px;
    background: #fff;
    color: #111827;
    font-size: 14px;
    font-weight: 800;
    line-height: 1.2;
    cursor: pointer;
  }

  .tv-filter-toggle:hover,
  .tv-filter-toggle:focus{
    border-color: #f97316;
    outline: none;
  }

  .tv-filter-toggle:focus-visible{
    box-shadow: 0 0 0 3px rgba(249,115,22,0.14);
  }

  .tv-filter-toggle::after{
    content: "";
    width: 8px;
    height: 8px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg);
    transition: transform 0.16s ease;
  }

  .tv-filters.is-open .tv-filter-toggle::after{
    transform: rotate(225deg);
  }

  .tv-filter-toggle__count{
    margin-left: auto;
    color: #c2410c;
    font-size: 12px;
    font-weight: 800;
  }

  .tv-filter-panel{
    display: none;
    margin-top: 10px;
  }

  .tv-filters.is-open .tv-filter-panel{
    display: block;
  }

  .tv-results-header{
    margin-top: 0;
    margin-bottom: 8px;
  }
}

/* Sticky breaks if any parent has overflow hidden/auto */
.elementor-section,
.elementor-container,
.elementor-column,
.elementor-column-wrap,
.elementor-widget-wrap{
  overflow: visible !important;
}

.tv-filter-title{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.45rem;
  font-weight: 700;
  margin: 0 0 2% 0;
  cursor: pointer;
  list-style: none;
}

.tv-filter-title::-webkit-details-marker{
  display: none;
}

.tv-filter-title::after{
  content: "+";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.15rem;
  height: 1.15rem;
  border: 1px solid rgba(15,23,42,0.18);
  border-radius: 999px;
  color: #0f172a;
  font-size: 0.9rem;
  line-height: 1;
}

.tv-filter-group[open] > .tv-filter-title::after{
  content: "-";
}

.tv-filter-title:focus-visible{
  outline: 2px solid rgba(249,115,22,0.55);
  outline-offset: 3px;
  border-radius: 4px;
}

.tv-filter-group__body{
  padding-top: 0.1rem;
}

.tv-screen-reader-text{
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.tv-keyword-search{
  --tv-keyword-height: 2.35rem;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) var(--tv-keyword-height) !important;
  align-items: stretch !important;
  gap: 0.35rem !important;
  margin: 0 0 0.85rem 0 !important;
  font-size: inherit !important;
}

.tv-filters .tv-keyword-search .tv-keyword-search__input{
  appearance: none !important;
  -webkit-appearance: none !important;
  width: 100% !important;
  min-width: 0 !important;
  height: var(--tv-keyword-height) !important;
  min-height: var(--tv-keyword-height) !important;
  padding: 0 0.65rem !important;
  border: 1px solid rgba(0,0,0,0.18) !important;
  border-radius: 6px !important;
  background: #fff !important;
  color: #222 !important;
  font: inherit !important;
  font-size: 1em !important;
  line-height: normal !important;
  box-sizing: border-box !important;
}

.tv-filters .tv-keyword-search .tv-keyword-search__button{
  appearance: none !important;
  -webkit-appearance: none !important;
  width: var(--tv-keyword-height) !important;
  min-width: var(--tv-keyword-height) !important;
  max-width: var(--tv-keyword-height) !important;
  height: var(--tv-keyword-height) !important;
  min-height: var(--tv-keyword-height) !important;
  max-height: var(--tv-keyword-height) !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 !important;
  margin: 0 !important;
  border: 1px solid rgba(0,0,0,0.18) !important;
  border-radius: 6px !important;
  background: #fff !important;
  color: #222 !important;
  font: inherit !important;
  line-height: 1 !important;
  cursor: pointer !important;
  box-sizing: border-box !important;
}

.tv-filters .tv-keyword-search .tv-keyword-search__button:hover,
.tv-filters .tv-keyword-search .tv-keyword-search__input:focus,
.tv-filters .tv-keyword-search .tv-keyword-search__button:focus{
  border-color: rgba(0,0,0,0.42) !important;
  outline: none !important;
}

.tv-filters .tv-keyword-search .tv-keyword-search__button svg{
  width: 1.05rem !important;
  height: 1.05rem !important;
  fill: none !important;
  stroke: currentColor !important;
  stroke-width: 2 !important;
  stroke-linecap: round !important;
}

.tv-filter-group{
  margin: 0 0 6% 0;
}

.tv-filters .tv-filter-group label{
  display: block !important;
  margin: 0 0 2% 0 !important;
}

/* Filter rows: checkbox | name | count */
.tv-filters .tv-filter-group label:focus-within,
.tv-experience-type-row:focus-within,
.tv-interest-row:focus-within,
.tv-planning-row:focus-within{
  outline: 2px solid rgba(249,115,22,0.55);
  outline-offset: 3px;
  border-radius: 4px;
}

.tv-filters .tv-filter-group label.tv-experience-type-row,
.tv-filters .tv-filter-group label.tv-interest-row,
.tv-filters .tv-filter-group label.tv-planning-row{
  display: grid !important;
  grid-template-columns: 18px minmax(0, 1fr) max-content !important;
  align-items: center !important;
  column-gap: 8px !important;
  width: 100% !important;
  min-width: 0 !important;
  margin: 4px 0 !important;
}

.tv-filters .tv-filter-group label.tv-experience-type-row input,
.tv-filters .tv-filter-group label.tv-interest-row input,
.tv-filters .tv-filter-group label.tv-planning-row input{
  width: 16px !important;
  height: 16px !important;
  margin: 0 !important;
}

.tv-experience-type-name,
.tv-interest-name,
.tv-planning-name{
  min-width: 0;
  white-space: nowrap;
}

.tv-count::before{ content: "("; }
.tv-count::after { content: ")"; }
.tv-count{
  justify-self: end;
  opacity: 0.75;
  white-space: nowrap;
}

/* ---------- Results column ---------- */
.tv-results{
  position: relative;
  min-width: 0;
  min-height: 350px;
}

.tv-results-header{
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 0 2% 0;
  min-width: 0;
}

.tv-results-header > div{
  min-width: 0;
  max-width: 100%;
}

#tv-status{
  font-weight: 600;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.tv-status-link{
  display: inline-block;
  color: inherit;
  font-weight: 600;
  text-decoration: underline;
  cursor: pointer;
}

.tv-status-link:focus-visible,
.tv-plan-title:focus-visible{
  outline: 2px solid #111827;
  outline-offset: 3px;
  border-radius: 4px;
}

#tv-results-list{
  display: flex;
  flex-direction: column;
  gap: 0.6em;
}

.tv-selected-heading{
  font-weight: 700;
  font-size: 0.95em;
  color: #111;
  margin: 0.2em 0 0.4em 0;
}

/* Load more button */
#tv-load-more{
  margin: 2% 0 0 0;
  padding: 1.5% 2%;
  border: 0.10% solid rgba(0,0,0,0.18);
  background: #fff;
  border-radius: 1.2%;
  cursor: pointer;
}
#tv-load-more:hover{ filter: brightness(0.98); }

/* ---------- Loading overlay ---------- */
.tv-loading-overlay{
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.82);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 500;
  min-height: 300px;
}

.tv-loading-overlay.is-on{
  display: flex;
}

.tv-results.is-loading .tv-loading-overlay{
  display: flex;
}

/* Global fallback loader (covers viewport) */
.tv-global-loading{
  position: fixed;
  inset: 0;
  background: rgba(255,255,255,0.82);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 20000;
}
.tv-global-loading.is-on{
  display: flex;
}

.tv-loading-box{
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1em;
  padding: 2em 3em;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.10);
}

/* Spinner ring */
.tv-spinner{
  width: 48px;
  height: 48px;
  border: 4px solid rgba(0,0,0,0.08);
  border-top-color: #e1306c;
  border-radius: 50%;
  animation: tv-spin 0.8s linear infinite;
}

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

.tv-loading-text{
  font-size: 1em;
  font-weight: 600;
  color: #444;
  letter-spacing: 0.02em;
}

/* ---------- Modal (iframe) ---------- */
.tv-modal{
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 10000;
}

.tv-modal.is-on{
  display: flex;
}

.tv-modal__backdrop{
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.55);
}

.tv-modal__dialog{
  position: relative;
  width: min(90vw, 980px);
  max-height: 85vh;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.25);
  overflow: hidden;
  z-index: 1;
  display: flex;
  flex-direction: column;
}

.tv-modal__close{
  position: absolute;
  top: 10px;
  right: 10px;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 18px;
  background: rgba(0,0,0,0.7);
  color: #fff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  z-index: 2;
}

.tv-modal__body{
  padding: 18px 20px 22px 20px;
  overflow: auto;
  flex: 1 1 auto;
}

.tv-modal__title{
  margin: 0;
  font-size: 0;
  line-height: 0;
}

.tv-modal__loading,
.tv-modal__error{
  padding: 18px;
  text-align: center;
  color: #444;
}

.tv-place-detail{
  color: #111827;
  font-size: 15px;
  line-height: 1.6;
}

.tv-place-detail__title{
  margin: 0 44px 14px 0;
  color: #f97316;
  font-size: 24px;
  font-weight: 800;
  line-height: 1.2;
}

.tv-place-detail__content > *:first-child{
  margin-top: 0;
}

.tv-place-detail__content > *:last-child{
  margin-bottom: 0;
}

.tv-place-detail__content p{
  margin: 0 0 12px;
}

.tv-place-detail__content ul,
.tv-place-detail__content ol{
  margin: 0 0 12px 20px;
  padding: 0;
}

.tv-place-detail__content a{
  color: #0f766e;
  font-weight: 700;
}

.tv-place-detail__official{
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid rgba(15,23,42,0.10);
}

.tv-place-official-link{
  display: inline-flex;
  align-items: center;
  gap: 4px;
  max-width: 100%;
  min-height: 36px;
  color: #475569;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
  text-decoration: underline;
  text-underline-offset: 3px;
  overflow-wrap: anywhere;
}

.tv-place-official-link:hover,
.tv-place-official-link:focus{
  color: #0f766e;
}

.tv-place-official-link:focus-visible{
  outline: 2px solid #f97316;
  outline-offset: 3px;
  border-radius: 4px;
}

body.tv-modal-open{
  overflow: hidden;
}

/* ---------- Trip plan modal ---------- */
.ta-modal{
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 36px 16px;
  z-index: 30000;
  box-sizing: border-box;
}

.ta-modal.is-open{
  display: flex;
}

.ta-modal-backdrop{
  position: absolute;
  inset: 0;
  background: rgba(15,23,42,0.45);
}

.ta-modal-panel{
  position: relative;
  z-index: 1;
  width: min(960px, calc(100vw - 32px));
  height: auto;
  max-height: calc(100vh - 72px);
  max-height: calc(100dvh - 72px);
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 18px 56px rgba(15,23,42,0.24);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.ta-modal-header,
.ta-modal-actions{
  flex: 0 0 auto;
}

.ta-modal-header{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 14px;
  border-bottom: 1px solid #e5e7eb;
}

.ta-modal-header h2{
  margin: 0;
  color: #1f2937;
  font-size: 20px;
  line-height: 1.3;
}

.ta-modal-close{
  width: 36px;
  height: 36px;
  border: 0;
  background: transparent;
  color: #374151;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

.ta-modal-actions{
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid #e5e7eb;
}

.ta-modal-body{
  flex: 1 1 auto;
  min-height: 0;
  padding: 10px 14px 24px;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

html.ta-modal-open,
body.ta-modal-open{
  overflow: hidden;
}

@media (max-width: 640px){
  .ta-modal{
    align-items: stretch;
    padding: 24px 10px;
  }

  .ta-modal-panel{
    width: 100%;
    height: auto;
    max-height: calc(100vh - 48px);
    max-height: calc(100dvh - 48px);
  }

  .ta-modal-header h2{
    font-size: 17px;
  }
}

/* ---------- Result row wrapper ---------- */
.tv-result-wrap{
  position: relative;
}

.tv-result-wrap.is-hidden{
  display: none !important;
}



/* =========================================================
   FIX 1: Checkbox overlays top-left of the IMAGE
   JS now adds .tv-thumb-anchor to the .elementor-widget-wrap
   (the content area inside the column, not the column itself)
   so the checkbox sits inside the padding boundary.
   ========================================================= */
.tv-thumb-anchor{
  position: relative !important;
}

#tv-results-list .tv-thumb-anchor > label.tv-select.tv-select--moved{
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  z-index: 50 !important;
  margin: 0 !important;
  padding: 2px !important;
  background: rgba(255,255,255,0.85);
  border-radius: 3px;
  width: 1.6em;
  height: 1.6em;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer;
}

#tv-results-list .tv-thumb-anchor > label.tv-select.tv-select--moved input.tv-pick{
  width: 1.1em;
  height: 1.1em;
  margin: 0 !important;
  cursor: pointer;
}

/* =========================================================
   FIX 2: Force ALL columns to top-align (image, desc, meta)
   JS also sets inline styles as a belt-and-suspenders backup.
   ========================================================= */

/* Main container: top-align columns */
#tv-results-list .tv-row-template .elementor-container{
  align-items: flex-start !important;
}

/* Every column and widget-wrap: top-align */
#tv-results-list .tv-row-template .elementor-column,
#tv-results-list .tv-row-template .elementor-widget-wrap{
  align-self: flex-start !important;
  align-items: flex-start !important;
  align-content: flex-start !important;
  justify-content: flex-start !important;
}

/* Sections: top-align */
#tv-results-list .tv-row-template section.elementor-section{
  align-items: flex-start !important;
}

/* Neutralize Elementor middle/center vertical alignment */
#tv-results-list .tv-row-template .elementor-section.elementor-section-content-middle,
#tv-results-list .tv-row-template .elementor-section.elementor-section-content-center{
  align-items: flex-start !important;
}

/* Kill min-height (common cause of vertical centering in Elementor) */
#tv-results-list .tv-row-template section,
#tv-results-list .tv-row-template .elementor-container,
#tv-results-list .tv-row-template .elementor-widget-container{
  min-height: 0 !important;
}

/* Remove top spacing injected by Elementor widgets */
#tv-results-list .tv-row-template .elementor-widget{
  margin-top: 0 !important;
}

/* Collapse spacer widgets inside meta column */
#tv-results-list .tv-row-template .tv-meta-col .elementor-widget-spacer{
  display: none !important;
}

/* ---------- Meta block: tight, top-aligned ---------- */
#tv-results-list .tv-row-template .ta-meta{
  display: block !important;
  margin: 0 !important;
  padding: 0 !important;
  line-height: 1.3 !important;
}

#tv-results-list .tv-row-template .ta-meta .ta-line{
  margin: 0 !important;
  padding: 0 !important;
  line-height: 1.15 !important;
}

#tv-results-list .tv-row-template .ta-meta .ta-line strong{
  margin: 0 !important;
  padding: 0 !important;
  line-height: 1.15 !important;
}

#tv-results-list .tv-row-template .ta-meta p{
  margin: 0 !important;
  padding: 0 !important;
}

/* ---------- Tighten gap between title section and content section ---------- */
#tv-results-list .tv-row-template section.elementor-section{
  margin-bottom: 0 !important;
  padding-bottom: 0 !important;
}

#tv-results-list .tv-row-template section.elementor-section + section.elementor-section{
  margin-top: 0 !important;
  padding-top: 0 !important;
}

/* Reduce the title heading bottom margin */
#tv-results-list .tv-row-template .elementor-widget-heading .elementor-heading-title{
  margin-bottom: 0.2em !important;
  padding-bottom: 0 !important;
}

/* ---------- Nested loop-item template fixes ---------- */

/* Collapse empty sections inside the meta loop-item
   (e.g. section 7386935 renders an empty shortcode but takes vertical space) */
#tv-results-list .e-loop-item section.elementor-section:has(.elementor-shortcode:empty):not(:has(.ta-meta)){
  display: none !important;
}

/* Override boxed section max-width inside meta so it fills the column */
#tv-results-list .e-loop-item .elementor-section-boxed > .elementor-container{
  max-width: 100% !important;
}

/* Ensure the loop-item itself has no extra spacing */
#tv-results-list .e-loop-item{
  margin: 0 !important;
  padding: 0 !important;
}

#tv-results-list .e-loop-item section.elementor-section{
  margin: 0 !important;
  padding: 0 !important;
}

/* ---------- Visit advice block ---------- */
.tv-advice{
  border: 1px solid rgba(0,0,0,0.12);
  border-radius: 12px;
  padding: 16px 18px;
  background: #fff;
}

.tv-advice__header{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.tv-advice__title{
  margin: 0;
  font-size: 1.1em;
}

.tv-advice__btn{
  border: 1px solid rgba(0,0,0,0.2);
  background: #111;
  color: #fff;
  padding: 8px 14px;
  border-radius: 8px;
  cursor: pointer;
}

.tv-advice__btn:disabled{
  opacity: 0.5;
  cursor: not-allowed;
}

.tv-advice__btn.is-loading{
  opacity: 0.7;
}

.tv-advice__status{
  font-size: 0.95em;
  color: #444;
  margin-bottom: 10px;
}

.tv-advice__status.is-error{
  color: #a00000;
}

.tv-advice__output{
  border-top: 1px solid rgba(0,0,0,0.08);
  padding-top: 10px;
}

/* ---------- Trip planner bar ---------- */
.ta-tripbar{
  display: grid;
  grid-template-columns: minmax(120px, 1fr) minmax(120px, 1fr) minmax(120px, 1fr) minmax(96px, 0.8fr) minmax(160px, 1.2fr) minmax(200px, 1.05fr);
  column-gap: 12px;
  row-gap: 0;
  align-items: end;
  margin: 16px 0 0;
  min-width: 0;
  max-width: 100%;
}

.ta-tripbar > label,
.ta-tripbar > .ta-transport-field{
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 116px;
  margin: 0;
  color: #5f6b7a;
  font-size: 13px;
  line-height: 1.35;
}

.ta-tripbar > label input,
.ta-tripbar > label select,
.ta-transport-fallback-wrap select{
  width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid #d7dee8;
  border-radius: 6px;
  background: #fff;
  color: #26313f;
  box-shadow: none;
}

.ta-tripbar > label input:focus,
.ta-tripbar > label select:focus,
.ta-transport-fallback-wrap select:focus{
  border-color: #f97316;
  box-shadow: 0 0 0 3px rgba(249,115,22,0.12);
  outline: 0;
}

.ta-transport-field{
  position: relative;
  min-width: 0;
  max-width: none;
}

.ta-transport-label{
  color: #5f6b7a;
  font-size: 13px;
  line-height: 1.35;
}

.ta-transport-selector{
  position: relative;
}

.ta-transport-popover{
  position: relative;
}

.ta-transport-trigger{
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid #d7dee8;
  border-radius: 6px;
  background: #fff;
  color: #26313f;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
}

.ta-transport-popover.is-open .ta-transport-trigger,
.ta-transport-trigger:hover{
  border-color: #f97316;
}

.ta-transport-trigger-label{
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ta-transport-trigger-count{
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: rgba(249,115,22,0.12);
  color: #c2410c;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
}

.ta-transport-panel{
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 200;
  width: 340px;
  max-width: min(340px, calc(100vw - 32px));
  border: 1px solid #d7dee8;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 16px 40px rgba(15,23,42,0.14);
  overflow: hidden;
}

.ta-transport-panel[hidden]{
  display: none;
}

.ta-transport-panel-head{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-bottom: 1px solid #edf2f7;
  background: #f8fafc;
}

.ta-transport-panel-title{
  color: #1f2937;
  font-size: 12px;
  font-weight: 700;
}

.ta-transport-panel-close{
  border: 0;
  background: transparent;
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.ta-transport-panel-body{
  max-height: 320px;
  overflow: auto;
  padding: 8px;
}

.ta-transport-item{
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2px 8px;
  align-items: center;
  padding: 6px 9px;
  border: 1px solid #eef2f7;
  border-radius: 8px;
  background: #fff;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.ta-transport-item + .ta-transport-item{
  margin-top: 8px;
}

.ta-transport-item.is-selected{
  border-color: #f97316;
  box-shadow: 0 3px 10px rgba(249,115,22,0.10);
}

.ta-transport-main{
  grid-column: 1 / 2;
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: 10px auto;
  align-items: start;
  column-gap: 0;
  row-gap: 2px;
  margin: 0;
  cursor: pointer;
  position: relative;
  min-width: 0;
}

.ta-transport-check{
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 1px;
  height: 1px;
  margin: 0;
}

.ta-transport-box{
  grid-column: 2 / 3;
  grid-row: 1 / 2;
  justify-self: center;
  width: 10px;
  height: 10px;
  border: 1px solid #bfc9d8;
  border-radius: 1px;
  background: #fff;
  display: inline-grid;
  place-items: center;
}

.ta-transport-box::before{
  content: "";
  width: 6px;
  height: 6px;
  transform: scale(0);
  transition: transform 0.12s ease-in-out;
  box-shadow: inset 1em 1em #0ea5e9;
  clip-path: polygon(14% 44%, 0 59%, 40% 100%, 100% 18%, 84% 4%, 39% 62%);
}

.ta-transport-check:checked + .ta-transport-box::before{
  transform: scale(1);
}

.ta-transport-check:checked + .ta-transport-topline .ta-transport-box::before{
  transform: scale(1);
}

.ta-transport-check:focus + .ta-transport-box{
  box-shadow: 0 0 0 1px rgba(14,165,233,0.16);
}

.ta-transport-check:focus + .ta-transport-topline .ta-transport-box{
  box-shadow: 0 0 0 1px rgba(14,165,233,0.16);
}

.ta-transport-topline{
  display: grid;
  grid-template-columns: 1fr 12px 1fr;
  grid-template-rows: 10px;
  align-items: center;
  column-gap: 0;
  width: 100%;
  min-width: 0;
}

.ta-transport-name{
  grid-column: 1 / 2;
  grid-row: 2 / 3;
  justify-self: center;
  text-align: center;
  color: #1f2937;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ta-transport-short{
  position: absolute;
  left: 0;
  top: calc(100% + 4px);
  z-index: 3;
  padding: 4px 6px;
  border-radius: 6px;
  background: #111827;
  color: #fff;
  font-size: 10px;
  line-height: 1.2;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-2px);
  transition: opacity 0.12s ease, transform 0.12s ease;
}

.ta-transport-main:hover .ta-transport-short,
.ta-transport-main:focus-within .ta-transport-short{
  opacity: 1;
  transform: translateY(0);
}

.ta-transport-badge{
  grid-column: 1 / 2;
  grid-row: 1 / 2;
  justify-self: start;
  align-self: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
  min-height: 10px;
  border-radius: 999px;
  background: rgba(249,115,22,0.12);
  color: #c2410c;
  font-size: 9px;
  line-height: 1;
  font-weight: 700;
  white-space: nowrap;
}

.ta-transport-topline-spacer{
  grid-column: 3 / 4;
  grid-row: 1 / 2;
}

.ta-transport-controls{
  grid-column: 2 / 3;
  grid-row: 1 / 2;
  display: flex;
  gap: 5px;
  align-items: center;
  justify-content: flex-end;
}

.ta-transport-move{
  min-height: 24px;
  min-width: 24px;
  padding: 3px 7px;
  border: 1px solid #d7dee8;
  border-radius: 6px;
  background: #f8fafc;
  color: #334155;
  font-size: 10px;
  font-weight: 600;
  cursor: pointer;
}

.ta-transport-move:hover:not(:disabled){
  border-color: #f97316;
  color: #c2410c;
}

.ta-transport-move:disabled{
  opacity: 0.45;
  cursor: not-allowed;
}

.ta-transport-help,
.ta-transport-empty{
  display: none;
  color: #6b7280;
  font-size: 11px;
  line-height: 1.35;
}

.ta-transport-fallback-wrap{
  margin-top: 4px;
  max-width: 260px;
}

.ta-trip-actions{
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  grid-column: 1 / -1;
  width: 100%;
  min-width: 0;
  margin-top: -6px;
}

#ta-trip-status,
#ta-trip-output{
  grid-column: 1 / -1;
}

#ta-trip-status:empty,
#ta-trip-output:empty{
  display: none;
}

.ta-tripbar + .tv-layout{
  margin-top: -12px;
}

.ta-ai-btn{
  min-height: 42px;
  max-width: 100%;
  padding: 10px 16px;
  border: 1px solid #111827;
  border-radius: 8px;
  background: #111827;
  color: #fff;
  font-weight: 700;
  line-height: 1.2;
  text-indent: 0;
  text-shadow: none;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  box-shadow: 0 3px 10px rgba(17,24,39,0.12);
}

.ta-selected-count-badge{
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  border: 1px solid rgba(249,115,22,0.22);
  border-radius: 8px;
  background: rgba(249,115,22,0.08);
  color: #9a3412;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ta-selected-count-badge.is-empty{
  border-color: #d7dee8;
  background: #f8fafc;
  color: #64748b;
}

.ta-ai-btn.ta-ai-btn--primary{
  border-color: #111827;
  background: #111827;
  color: #fff;
  box-shadow: 0 3px 10px rgba(17,24,39,0.12);
}

.ta-ai-btn:hover:not(:disabled),
.ta-ai-btn:focus:not(:disabled),
.ta-ai-btn.ta-ai-btn--primary:hover:not(:disabled){
  border-color: #f97316;
  background: #f97316;
  color: #fff;
}

.ta-ai-btn.ta-ai-btn--secondary{
  border-color: #111827;
  background: #111827;
  color: #fff;
  box-shadow: 0 3px 10px rgba(17,24,39,0.12);
}

.ta-trip-actions .ta-ai-btn,
.ta-trip-actions .ta-ai-btn.ta-ai-btn--primary{
  border-color: #111827;
  background: #111827;
  color: #fff;
}

.ta-trip-actions .ta-ai-btn.ta-ai-btn--secondary{
  border-color: #111827;
  background: #111827;
  color: #fff;
  box-shadow: 0 3px 10px rgba(17,24,39,0.12);
}

.ta-trip-actions .ta-ai-btn:hover:not(:disabled),
.ta-trip-actions .ta-ai-btn:focus:not(:disabled),
.ta-trip-actions .ta-ai-btn:active:not(:disabled),
.ta-trip-actions .ta-ai-btn.ta-ai-btn--primary:hover:not(:disabled),
.ta-trip-actions .ta-ai-btn.ta-ai-btn--primary:focus:not(:disabled),
.ta-trip-actions .ta-ai-btn.ta-ai-btn--primary:active:not(:disabled){
  border-color: #f97316;
  background: #f97316;
  color: #fff;
}

.ta-trip-actions .ta-ai-btn.ta-ai-btn--secondary:hover:not(:disabled),
.ta-trip-actions .ta-ai-btn.ta-ai-btn--secondary:focus:not(:disabled),
.ta-trip-actions .ta-ai-btn.ta-ai-btn--secondary:active:not(:disabled){
  border-color: #f97316;
  background: #f97316;
  color: #fff;
}

.ta-ai-btn.is-disabled,
.ta-ai-btn:disabled{
  opacity: 0.5;
  cursor: not-allowed;
}

#ta-trip-status,
#ta-trip-output{
  width: 100%;
}

@media (max-width: 900px){
  .ta-tripbar{
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ta-transport-panel{
    width: min(340px, calc(100vw - 32px));
  }
}

@media (max-width: 640px){
  .ta-tripbar{
    grid-template-columns: 1fr;
  }

  .ta-transport-panel{
    left: 0;
    right: auto;
    width: min(100vw - 32px, 340px);
  }

  .ta-trip-actions{
    flex-direction: column;
  }

  .ta-ai-btn{
    width: 100%;
  }

  .ta-selected-count-badge{
    width: 100%;
  }
}

/* ---------- Planning-first place rows ---------- */
.tv-layout{
  max-width: 1180px !important;
}

section.tv-filters-section{
  width: min(90vw, 1180px) !important;
  max-width: min(90vw, 1180px) !important;
}

.tv-workflow-guidance{
  display: inline-block;
  max-width: 100%;
  margin-top: 6px;
  padding: 7px 10px;
  border-left: 3px solid #f97316;
  border-radius: 6px;
  background: #fff7ed;
  color: #334155;
  font-size: 13px;
  line-height: 1.4;
  font-weight: 700;
  overflow-wrap: anywhere;
  white-space: normal;
}

.tv-place-row{
  display: grid;
  grid-template-columns: 118px minmax(0, 1fr) minmax(140px, 190px);
  grid-template-areas:
    "media title booking"
    "media main booking";
  column-gap: 12px;
  row-gap: 4px;
  align-items: start;
  padding: 10px 12px;
  border: 1px solid rgba(15,23,42,0.10);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15,23,42,0.04);
  min-width: 0;
  max-width: 100%;
}

.tv-result-wrap{
  margin-bottom: 8px;
}

.tv-result-wrap.is-selected .tv-place-row{
  border-color: rgba(249,115,22,0.45);
  background: #fffaf5;
  box-shadow: 0 2px 10px rgba(249,115,22,0.08);
}

.tv-place-row:focus-within{
  outline: 2px solid rgba(249,115,22,0.50);
  outline-offset: 2px;
}

.tv-plan-titlebar{
  grid-area: title;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto auto;
  gap: 6px;
  align-items: center;
  min-width: 0;
  min-height: 22px;
}

.tv-select.tv-select--planning{
  position: static !important;
  display: inline-flex !important;
  grid-column: 1;
  width: 20px;
  height: 20px;
  align-items: center;
  justify-content: center;
  margin: 0 !important;
  cursor: pointer;
}

.tv-select.tv-select--planning input.tv-pick{
  width: 16px;
  height: 16px;
  margin: 0 !important;
  cursor: pointer;
}

.tv-plan-title{
  grid-column: 2;
  min-width: 0;
  color: #111827;
  font-size: 18px;
  font-weight: 800;
  line-height: 1.15;
  text-decoration: none;
  overflow: hidden;
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
}

.tv-plan-item-type{
  grid-column: 3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 20px;
  max-width: 170px;
  padding: 1px 8px;
  border: 1px solid rgba(15,23,42,0.12);
  border-radius: 999px;
  background: #f8fafc;
  color: #334155;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tv-plan-title:hover,
.tv-plan-title:focus{
  color: #f97316;
  text-decoration: underline;
}

.tv-selected-pill{
  display: none;
  grid-column: 4;
  align-items: center;
  justify-content: center;
  min-height: 20px;
  padding: 1px 8px;
  border: 1px solid rgba(249,115,22,0.35);
  border-radius: 999px;
  background: rgba(249,115,22,0.10);
  color: #9a3412;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.tv-result-wrap.is-selected .tv-selected-pill{
  display: inline-flex;
}

.tv-plan-media{
  grid-area: media;
}

.tv-plan-thumb{
  display: block;
  width: 118px;
  aspect-ratio: 4 / 3;
  height: auto;
  border-radius: 6px;
  object-fit: cover;
  background: #e5e7eb;
}

.tv-plan-thumb-empty{
  width: 118px;
  aspect-ratio: 4 / 3;
  border-radius: 6px;
  background: linear-gradient(135deg, #e5e7eb, #f8fafc);
  color: #64748b;
  display: grid;
  place-items: center;
  text-align: center;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
}

.tv-plan-main{
  grid-area: main;
  min-width: 0;
}

.tv-plan-summary{
  margin: 0 0 5px;
  color: #475569;
  font-size: 12px;
  line-height: 1.3;
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tv-plan-attrs{
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin: 0;
}

.tv-plan-attr{
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  min-height: 21px;
  padding: 2px 7px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #334155;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tv-plan-booking{
  grid-area: booking;
  min-width: 0;
  color: #111827;
  align-self: start;
  padding-top: 2px;
}

.tv-plan-warning{
  margin-bottom: 6px;
  padding: 6px 8px;
  border-left: 3px solid #f97316;
  border-radius: 5px;
  background: #fff7ed;
  color: #9a3412;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.3;
}

.tv-plan-warning--closed{
  border-left-color: #dc2626;
  background: #fef2f2;
  color: #991b1b;
}

.tv-plan-booking-status{
  color: #111827;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.25;
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tv-plan-booking-status--quiet{
  color: #475569;
  font-weight: 700;
}

.tv-plan-price{
  margin-top: 3px;
  color: #334155;
  font-size: 12px;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.tv-plan-booking-cta{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  min-height: 34px;
  margin-top: 8px;
  padding: 7px 10px;
  border-radius: 6px;
  background: #111827;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.tv-plan-booking .tv-plan-booking-cta,
.tv-plan-booking .tv-plan-booking-cta:visited,
#tv-results-list .tv-plan-booking-cta,
#tv-results-list .tv-plan-booking-cta:visited{
  color: #fff;
}

.tv-plan-booking-cta:hover,
.tv-plan-booking-cta:focus{
  background: #f97316;
  color: #fff;
  outline: 2px solid transparent;
  outline-offset: 2px;
}

.tv-plan-booking-cta.is-disabled,
.tv-plan-booking-cta.is-disabled:visited,
.tv-plan-booking-cta.is-disabled:hover,
.tv-plan-booking-cta.is-disabled:focus{
  background: #e5e7eb;
  color: #475569;
  cursor: not-allowed;
  box-shadow: none;
}

#tv-results-list .tv-plan-booking-cta.is-disabled,
#tv-results-list .tv-plan-booking-cta.is-disabled:visited,
#tv-results-list .tv-plan-booking-cta.is-disabled:hover,
#tv-results-list .tv-plan-booking-cta.is-disabled:focus{
  background: #e5e7eb;
  color: #475569;
}

.tv-plan-booking-cta:focus-visible,
.tv-select.tv-select--planning input.tv-pick:focus-visible{
  outline: 2px solid #111827;
  outline-offset: 2px;
}

.tv-plan-insight{
  display: flex;
  gap: 5px;
  margin-top: 6px;
  color: #475569;
  font-size: 12px;
  line-height: 1.3;
  min-width: 0;
}

.tv-plan-insight-label{
  flex: 0 0 auto;
  color: #c2410c;
  font-weight: 800;
}

.tv-plan-insight span:last-child{
  min-width: 0;
  overflow-wrap: anywhere;
}

@media (max-width: 900px){
  .tv-place-row{
    grid-template-columns: 112px minmax(0, 1fr);
    grid-template-areas:
      "media title"
      "media main"
      "booking booking";
    row-gap: 4px;
  }

  .tv-plan-thumb,
  .tv-plan-thumb-empty{
    width: 112px;
  }
}

@media (max-width: 640px){
  section.tv-filters-section{
    width: calc(100vw - 24px) !important;
    max-width: calc(100vw - 24px) !important;
  }

  .tv-filters{
    padding: 12px;
  }

  .tv-place-row{
    grid-template-columns: 86px minmax(0, 1fr);
    grid-template-areas:
      "media title"
      "media main"
      "booking booking";
    column-gap: 10px;
    padding: 10px;
  }

  .tv-plan-titlebar{
    grid-template-columns: 22px minmax(0, 1fr);
  }

  .tv-plan-item-type{
    grid-column: 2 / 3;
    justify-self: start;
    max-width: 100%;
  }

  .tv-selected-pill{
    grid-column: 2 / 3;
    justify-self: start;
  }

  .tv-plan-title{
    font-size: 16px;
    -webkit-line-clamp: 2;
  }

  .tv-plan-thumb,
  .tv-plan-thumb-empty{
    width: 86px;
  }

  .tv-plan-summary{
    font-size: 12px;
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
  }

  .tv-plan-booking-cta{
    width: 100%;
  }

  .tv-plan-booking,
  .tv-plan-booking-status,
  .tv-plan-price{
    width: 100%;
  }

  .tv-plan-insight{
    display: flex;
    flex-direction: column;
    gap: 2px;
  }

  .tv-workflow-guidance{
    white-space: normal;
  }
}
