/*
 * Travel data calculator (templates/default/data_calculator_tool.php).
 * Loaded in <head> by index::travel_data_calculator() after
 * destination_v2.css; every rule is scoped to .calc-v2. Mirrors the app's
 * calculator screen (CardV2, level meter, chips, stat tiles, InfoBannerV2
 * and the destination sheet) in white cards with neutral grey fills and
 * borders, navy for accents (selected chip, slider, lit bars, switch,
 * figures, icons, links). Brand pink is kept for the main CTA buttons only.
 */

.calc-v2 {
   /* Brand pink: main CTA buttons only. */
   --cv-accent: #E8236E;
   --cv-accent-dark: #C2145A;
   --cv-soft: #F4F5F7;
   --cv-navy: #14183A;
   --cv-border: #E6E8EC;
   --cv-text2: #6B6B6B;
   --cv-text3: #8A8A8A;
   --cv-warning: #FF9500;
   --cv-shadow: 0 8px 24px rgba(20, 24, 58, 0.06);
}

.calc-v2 .calc-sr {
   position: absolute;
   width: 1px;
   height: 1px;
   overflow: hidden;
   clip: rect(0 0 0 0);
   white-space: nowrap;
}

.calc-v2 .calc-hero-copy {
   margin-top: 16px;
   max-width: 720px;
}

.calc-v2 .dv2-hero h1 {
   margin: 0;
}

/* ---------------------------------------------------------------- */
/* Layout                                                           */
/* ---------------------------------------------------------------- */
.calc-v2 .calc-toolbar {
   display: flex;
   justify-content: flex-end;
   gap: 4px;
   margin: 12px 0 4px;
}

.calc-v2 .calc-layout {
   display: grid;
   grid-template-columns: minmax(0, 1fr);
   gap: 12px;
   max-width: 640px;
   margin: 0 auto;
}

.calc-v2 .calc-col {
   display: flex;
   flex-direction: column;
   gap: 12px;
   min-width: 0;
}

@media (min-width: 960px) {
   .calc-v2 .calc-toolbar {
      margin-top: 20px;
   }

   .calc-v2 .calc-layout {
      grid-template-columns: minmax(0, 1fr) minmax(0, 420px);
      gap: 24px;
      max-width: none;
      align-items: start;
   }

   .calc-v2 .calc-col-results {
      position: sticky;
      top: 96px;
   }
}

/* ---------------------------------------------------------------- */
/* Cards and type                                                   */
/* ---------------------------------------------------------------- */
.calc-v2 .calc-card {
   box-sizing: border-box;
   padding: 14px 16px;
   background: #fff;
   border: 1px solid var(--cv-border);
   border-radius: 20px;
   box-shadow: var(--cv-shadow);
}

.calc-v2 .calc-label {
   display: block;
   margin: 0;
   font-size: 11px;
   font-weight: 700;
   letter-spacing: 1.2px;
   line-height: 1.4;
   text-transform: uppercase;
   color: var(--cv-text3);
}

.calc-v2 .calc-row {
   display: flex;
   align-items: center;
   justify-content: space-between;
   gap: 8px;
}

.calc-v2 .calc-help,
.calc-v2 .calc-hint {
   margin: 4px 0 0;
   font-size: 12px;
   line-height: 1.3;
   color: var(--cv-text2);
}

.calc-v2 .calc-link {
   display: inline-flex;
   align-items: center;
   gap: 6px;
   min-height: 36px;
   padding: 0 8px;
   border: 0;
   background: none;
   font-family: inherit;
   font-size: 14px;
   font-weight: 600;
   color: var(--cv-navy);
   cursor: pointer;
}

.calc-v2 .calc-link:disabled {
   opacity: .4;
   cursor: default;
}

.calc-v2 .calc-link:hover:not(:disabled) {
   text-decoration: underline;
}

.calc-v2 .calc-link-accent {
   color: var(--cv-navy);
}

.calc-v2 button:focus-visible,
.calc-v2 a:focus-visible,
.calc-v2 input:focus-visible + .calc-switch-track {
   outline: 2px solid var(--cv-navy);
   outline-offset: 2px;
}

.calc-v2 .calc-icon-circle {
   display: inline-flex;
   flex: 0 0 auto;
   align-items: center;
   justify-content: center;
   width: 36px;
   height: 36px;
   border-radius: 50%;
   background: var(--cv-soft);
   font-size: 16px;
   color: var(--cv-navy);
}

.calc-v2 .calc-icon-warning {
   width: 32px;
   height: 32px;
   background: rgba(255, 149, 0, 0.12);
   color: var(--cv-warning);
}

/* Main call to action ("View all <country> plans" / "Choose destination"):
   solid brand pink, the only pink on the page besides the plan cards'
   Add to basket buttons. */
.calc-v2 .calc-pill {
   display: flex;
   align-items: center;
   justify-content: center;
   gap: 8px;
   box-sizing: border-box;
   width: 100%;
   height: 44px;
   padding: 0 20px;
   border: 0;
   border-radius: 999px;
   background: var(--cv-accent);
   font-family: inherit;
   font-size: 14px;
   font-weight: 600;
   color: #fff;
   text-decoration: none;
   cursor: pointer;
   transition: background-color .15s ease;
}

.calc-v2 .calc-pill:hover {
   background: var(--cv-accent-dark);
   color: #fff;
   text-decoration: none;
}

/* "Choose destination" inside the destination card: navy outline pill. */
.calc-v2 .calc-pill-inline {
   border: 1.5px solid var(--cv-navy);
   background: #fff;
   color: var(--cv-navy);
}

.calc-v2 .calc-pill-inline:hover {
   background: var(--cv-soft);
   color: var(--cv-navy);
}

.calc-v2 .calc-pill[hidden] {
   display: none;
}

.calc-v2 .calc-pill-inline {
   display: inline-flex;
   width: auto;
}

/* ---------------------------------------------------------------- */
/* Destination card                                                 */
/* ---------------------------------------------------------------- */
.calc-v2 .calc-card-dest {
   padding: 12px 12px 12px 16px;
}

.calc-v2 .calc-dest-empty,
.calc-v2 .calc-dest-chosen {
   margin-top: 8px;
}

.calc-v2 .calc-dest-chosen {
   display: flex;
   align-items: center;
   gap: 10px;
}

.calc-v2 .calc-dest-chosen[hidden],
.calc-v2 .calc-dest-empty[hidden] {
   display: none;
}

.calc-v2 .calc-dest-flag {
   flex: 0 0 32px;
   width: 32px;
   height: 22px;
   border-radius: 4px;
   object-fit: cover;
}

.calc-v2 .calc-dest-name {
   flex: 1 1 auto;
   min-width: 0;
   font-size: 16px;
   font-weight: 600;
   color: var(--cv-navy);
}

/* ---------------------------------------------------------------- */
/* Trip length: slider and day chips                                */
/* ---------------------------------------------------------------- */
.calc-v2 .calc-days-value {
   font-size: 16px;
   font-weight: 700;
   color: var(--cv-navy);
}

.calc-v2 .calc-range {
   -webkit-appearance: none;
   appearance: none;
   display: block;
   width: 100%;
   height: 36px;
   margin: 4px 0;
   padding: 0;
   background: transparent;
   cursor: pointer;
   --cv-fill: 7%;
}

.calc-v2 .calc-range::-webkit-slider-runnable-track {
   height: 4px;
   border-radius: 999px;
   background: linear-gradient(to right, var(--cv-navy) var(--cv-fill), var(--cv-border) var(--cv-fill));
}

.calc-v2 .calc-range::-moz-range-track {
   height: 4px;
   border-radius: 999px;
   background: var(--cv-border);
}

.calc-v2 .calc-range::-moz-range-progress {
   height: 4px;
   border-radius: 999px;
   background: var(--cv-navy);
}

.calc-v2 .calc-range::-webkit-slider-thumb {
   -webkit-appearance: none;
   width: 18px;
   height: 18px;
   margin-top: -7px;
   border: 0;
   border-radius: 50%;
   background: var(--cv-navy);
   box-shadow: 0 0 0 0 rgba(20, 24, 58, 0.08);
   transition: box-shadow .15s ease;
}

.calc-v2 .calc-range::-moz-range-thumb {
   width: 18px;
   height: 18px;
   border: 0;
   border-radius: 50%;
   background: var(--cv-navy);
}

.calc-v2 .calc-range:active::-webkit-slider-thumb,
.calc-v2 .calc-range:focus-visible::-webkit-slider-thumb {
   box-shadow: 0 0 0 10px rgba(20, 24, 58, 0.08);
}

.calc-v2 .calc-range:focus {
   outline: none;
}

.calc-v2 .calc-chips {
   display: flex;
   gap: 8px;
}

.calc-v2 .calc-chip {
   flex: 1 1 0;
   min-width: 0;
   min-height: 44px;
   padding: 8px 12px;
   border: 0;
   border-radius: 999px;
   background: var(--cv-soft);
   font-family: inherit;
   font-size: 13px;
   font-weight: 600;
   color: var(--cv-navy);
   cursor: pointer;
   transition: background-color .15s ease, color .15s ease;
}

.calc-v2 .calc-chip[aria-pressed="true"] {
   background: var(--cv-navy);
   color: #fff;
}

/* ---------------------------------------------------------------- */
/* Hotspot switch                                                   */
/* ---------------------------------------------------------------- */
.calc-v2 .calc-card-hotspot {
   display: flex;
   align-items: center;
   gap: 12px;
   padding: 12px 12px 12px 16px;
}

.calc-v2 .calc-hotspot-copy {
   flex: 1 1 auto;
   min-width: 0;
   margin: 0;
   cursor: pointer;
}

.calc-v2 .calc-hotspot-copy strong {
   display: block;
   font-size: 15px;
   font-weight: 600;
   color: var(--cv-navy);
}

.calc-v2 .calc-hotspot-copy span {
   display: block;
   margin-top: 2px;
   font-size: 12px;
   line-height: 1.3;
   color: var(--cv-text2);
}

.calc-v2 .calc-switch {
   position: relative;
   flex: 0 0 52px;
   width: 52px;
   height: 32px;
}

.calc-v2 .calc-switch input {
   position: absolute;
   inset: 0;
   width: 100%;
   height: 100%;
   margin: 0;
   opacity: 0;
   cursor: pointer;
   z-index: 1;
}

.calc-v2 .calc-switch-track {
   position: absolute;
   inset: 0;
   border: 2px solid #79747E;
   border-radius: 999px;
   background: #E6E0E9;
   box-sizing: border-box;
   transition: background-color .15s ease, border-color .15s ease;
}

.calc-v2 .calc-switch-track::after {
   content: "";
   position: absolute;
   top: 50%;
   left: 6px;
   width: 16px;
   height: 16px;
   border-radius: 50%;
   background: #79747E;
   transform: translateY(-50%);
   transition: left .15s ease, width .15s ease, height .15s ease, background-color .15s ease;
}

.calc-v2 .calc-switch input:checked + .calc-switch-track {
   border-color: var(--cv-navy);
   background: var(--cv-navy);
}

.calc-v2 .calc-switch input:checked + .calc-switch-track::after {
   left: 22px;
   width: 24px;
   height: 24px;
   background: #fff;
}

/* ---------------------------------------------------------------- */
/* Daily usage: activity rows and the five-step level meter         */
/* ---------------------------------------------------------------- */
.calc-v2 .calc-activity {
   margin-top: 16px;
}

.calc-v2 .calc-activity-name {
   font-size: 14px;
   font-weight: 600;
   color: var(--cv-navy);
}

.calc-v2 .calc-level-name {
   flex: 0 0 auto;
   min-height: 28px;
   margin-right: -8px;
   color: var(--cv-text3);
}

.calc-v2 .calc-activity.is-set .calc-level-name {
   color: var(--cv-navy);
}

.calc-v2 .calc-activity .calc-hint {
   margin-top: 0;
}

.calc-v2 .calc-meter {
   display: flex;
   gap: 6px;
   margin-top: 4px;
}

.calc-v2 .calc-bar {
   display: flex;
   flex: 1 1 0;
   align-items: center;
   min-width: 0;
   height: 44px;
   padding: 0;
   border: 0;
   background: none;
   cursor: pointer;
}

.calc-v2 .calc-bar span {
   display: block;
   width: 100%;
   height: 8px;
   border-radius: 999px;
   background: var(--cv-border);
   transition: background-color .15s ease;
}

.calc-v2 .calc-bar.is-on span {
   background: var(--cv-navy);
}

/* ---------------------------------------------------------------- */
/* Estimate                                                         */
/* ---------------------------------------------------------------- */
.calc-v2 .calc-estimate {
   padding: 14px 16px 16px;
}

.calc-v2 .calc-headline {
   margin-top: 10px;
   font-size: 34px;
   font-weight: 700;
   line-height: 1.1;
   color: var(--cv-navy);
   white-space: nowrap;
}

.calc-v2 .calc-headline-sub {
   margin: 0;
   font-size: 13px;
   line-height: 1.3;
   color: var(--cv-text2);
}

.calc-v2 .calc-stats {
   display: grid;
   grid-template-columns: repeat(3, minmax(0, 1fr));
   gap: 8px;
   margin-top: 14px;
}

.calc-v2 .calc-stat {
   min-width: 0;
   padding: 12px;
   border-radius: 14px;
   background: var(--cv-soft);
}

.calc-v2 .calc-stat strong {
   display: block;
   font-size: 16px;
   font-weight: 700;
   line-height: 1.3;
   color: var(--cv-navy);
   white-space: nowrap;
}

.calc-v2 .calc-stat span {
   display: block;
   margin-top: 2px;
   font-size: 11px;
   line-height: 1.25;
   color: var(--cv-text2);
}

@media (max-width: 359px) {
   .calc-v2 .calc-stat {
      padding: 10px 8px;
   }

   .calc-v2 .calc-stat strong {
      font-size: 14px;
   }
}

/* InfoBannerV2 */
.calc-v2 .calc-banner {
   display: flex;
   align-items: center;
   gap: 12px;
   box-sizing: border-box;
   padding: 14px;
   border: 1px solid var(--cv-border);
   border-radius: 16px;
   background: #fff;
}

.calc-v2 .calc-banner[hidden] {
   display: none;
}

.calc-v2 .calc-banner p {
   margin: 0;
   font-size: 13px;
   line-height: 1.4;
   color: var(--cv-navy);
}

.calc-v2 .calc-banner-info {
   margin-top: 20px;
}

.calc-v2 .calc-note {
   margin: 0;
   font-size: 12px;
   line-height: 1.4;
   color: var(--cv-text3);
}

/* ---------------------------------------------------------------- */
/* Suggested plans                                                  */
/* ---------------------------------------------------------------- */
.calc-v2 .calc-suggest[hidden] {
   display: none;
}

.calc-v2 .calc-suggest-title {
   margin: 0;
   font-size: 16px;
   font-weight: 600;
   letter-spacing: 0;
   color: var(--cv-navy);
}

.calc-v2 .calc-suggest .calc-help {
   margin-bottom: 10px;
}

.calc-v2 .calc-suggest-label {
   display: inline-block;
   margin: 0 0 6px;
   padding: 4px 10px;
   border-radius: 999px;
   background: var(--cv-soft);
   font-size: 10px;
   font-weight: 700;
   letter-spacing: 1px;
   text-transform: uppercase;
   color: var(--cv-navy);
}

.calc-v2 .calc-suggest .dv2-plan + .calc-suggest-label {
   margin-top: 12px;
}

.calc-v2 .calc-suggest-loading {
   display: flex;
   justify-content: center;
   padding: 24px 0;
}

.calc-v2 .calc-suggest-loading[hidden] {
   display: none;
}

.calc-v2 .calc-spinner {
   width: 28px;
   height: 28px;
   border: 3px solid var(--cv-soft);
   border-top-color: var(--cv-navy);
   border-radius: 50%;
   animation: calc-spin .8s linear infinite;
}

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

/* ---------------------------------------------------------------- */
/* Tips and background data                                         */
/* ---------------------------------------------------------------- */
.calc-v2 .calc-tips {
   display: grid;
   grid-template-columns: minmax(0, 1fr);
   gap: 12px;
}

@media (min-width: 768px) {
   .calc-v2 .calc-tips {
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: 16px;
   }
}

.calc-v2 .calc-tips .calc-card,
.calc-v2 .calc-drains {
   padding: 18px 20px;
}

.calc-v2 .calc-tips h3,
.calc-v2 .calc-drains h3 {
   display: flex;
   align-items: center;
   gap: 10px;
   margin: 0 0 10px;
   font-size: 16px;
   font-weight: 600;
}

.calc-v2 .calc-tips p,
.calc-v2 .calc-drains p {
   margin: 0;
   font-size: 14px;
   line-height: 1.6;
}

.calc-v2 .calc-drains {
   margin-top: 16px;
}

.calc-v2 .calc-drains-grid {
   display: grid;
   grid-template-columns: minmax(0, 1fr);
   gap: 24px;
}

@media (min-width: 960px) {
   .calc-v2 .calc-drains {
      padding: 28px 32px;
   }

   .calc-v2 .calc-drains-grid {
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 40px;
   }
}

.calc-v2 .calc-list,
.calc-v2 .calc-accordion ol {
   margin: 10px 0 0;
   padding-left: 20px;
   font-size: 14px;
   line-height: 1.6;
}

.calc-v2 .calc-list li,
.calc-v2 .calc-accordion ol li {
   margin-bottom: 6px;
}

.calc-v2 .calc-list strong,
.calc-v2 .calc-accordion strong {
   color: var(--cv-navy);
}

.calc-v2 .calc-accordion {
   margin: 14px 0 0;
   padding: 0;
}

.calc-v2 .calc-accordion > li {
   padding: 12px 0;
   border-top: 1px solid var(--cv-border);
}

.calc-v2 .calc-accordion > li:last-child {
   border-bottom: 1px solid var(--cv-border);
}

.calc-v2 .calc-accordion > :nth-child(n+2) {
   margin-top: 0;
}

.calc-v2 .calc-accordion .uk-accordion-title {
   font-size: 15px;
   font-weight: 600;
   color: var(--cv-navy);
}

.calc-v2 .calc-accordion .uk-accordion-content {
   margin-top: 8px;
}

/* ---------------------------------------------------------------- */
/* Destination sheet: bottom sheet on phones, dialog on wider screens */
/* ---------------------------------------------------------------- */
.calc-v2 .calc-sheet {
   position: fixed;
   inset: 0;
   z-index: 1100;
   display: flex;
   align-items: flex-end;
   justify-content: center;
}

.calc-v2 .calc-sheet[hidden] {
   display: none;
}

.calc-v2 .calc-sheet-backdrop {
   position: absolute;
   inset: 0;
   background: rgba(0, 0, 0, 0.4);
}

.calc-v2 .calc-sheet-panel {
   position: relative;
   display: flex;
   flex-direction: column;
   box-sizing: border-box;
   width: 100%;
   max-width: 560px;
   height: 85vh;
   height: 85dvh;
   border-radius: 24px 24px 0 0;
   background: #fff;
   overflow: hidden;
   animation: calc-sheet-in .2s ease-out;
}

@keyframes calc-sheet-in {
   from {
      transform: translateY(24px);
      opacity: 0;
   }
}

@media (min-width: 640px) {
   .calc-v2 .calc-sheet {
      align-items: center;
      padding: 24px;
   }

   .calc-v2 .calc-sheet-panel {
      height: min(720px, 85vh);
      border-radius: 24px;
   }
}

.calc-v2 .calc-sheet-head {
   padding: 10px 20px 12px;
   border-bottom: 1px solid var(--cv-border);
}

.calc-v2 .calc-sheet-handle {
   display: block;
   width: 36px;
   height: 4px;
   margin: 0 auto 12px;
   border-radius: 2px;
   background: var(--cv-border);
}

.calc-v2 .calc-sheet-close {
   width: 44px;
   height: 44px;
   margin-right: -10px;
   border: 0;
   background: none;
   font-size: 20px;
   color: var(--cv-text2);
   cursor: pointer;
}

.calc-v2 .calc-search {
   position: relative;
   margin-top: 8px;
}

.calc-v2 .calc-search i {
   position: absolute;
   top: 50%;
   left: 14px;
   font-size: 15px;
   color: var(--cv-text3);
   transform: translateY(-50%);
   pointer-events: none;
}

.calc-v2 .calc-search input {
   box-sizing: border-box;
   width: 100%;
   height: 48px;
   padding: 0 14px 0 40px;
   border: 1px solid var(--cv-border);
   border-radius: 14px;
   background: #fff;
   font-family: inherit;
   font-size: 16px;
   color: var(--cv-navy);
}

.calc-v2 .calc-search input:focus {
   border-color: var(--cv-navy);
   outline: none;
}

.calc-v2 .calc-sheet-list {
   flex: 1 1 auto;
   margin: 0;
   padding: 8px 0;
   list-style: none;
   overflow-y: auto;
   overscroll-behavior: contain;
   -webkit-overflow-scrolling: touch;
}

.calc-v2 .calc-sheet-list li {
   margin: 0;
}

.calc-v2 .calc-sheet-list li[hidden] {
   display: none;
}

.calc-v2 .calc-sheet-item {
   display: flex;
   align-items: center;
   gap: 16px;
   width: 100%;
   min-height: 56px;
   padding: 8px 20px;
   border: 0;
   background: none;
   font-family: inherit;
   font-size: 15px;
   font-weight: 500;
   text-align: left;
   color: var(--cv-navy);
   cursor: pointer;
}

.calc-v2 .calc-sheet-item:hover,
.calc-v2 .calc-sheet-item:focus-visible {
   background: var(--cv-soft);
}

.calc-v2 .calc-sheet-item img {
   flex: 0 0 38px;
   width: 38px;
   height: 26px;
   border-radius: 4px;
   object-fit: cover;
}

.calc-v2 .calc-sheet-empty {
   display: flex;
   flex: 1 1 auto;
   flex-direction: column;
   align-items: center;
   justify-content: center;
   gap: 6px;
   padding: 24px;
   text-align: center;
   font-size: 13px;
   color: var(--cv-text2);
}

.calc-v2 .calc-sheet-empty[hidden] {
   display: none;
}

.calc-v2 .calc-sheet-empty strong {
   margin-top: 6px;
   font-size: 16px;
   font-weight: 600;
   color: var(--cv-navy);
}

html.calc-sheet-open,
html.calc-sheet-open body {
   overflow: hidden;
}
