/* Travel Gate cart and checkout — approved navy/teal system. */

.tg-btn {
  display: inline-flex; align-items: center; justify-content: center;
  font-family: 'Manrope', sans-serif; font-size: 14.5px; font-weight: 700;
  letter-spacing: .06em; padding: 16px 24px; border-radius: 14px;
  text-decoration: none; border: 0; cursor: pointer; transition: all .25s ease;
}
.tg-btn-primary { background: #0095A9; box-shadow: 0 14px 30px rgba(0,149,169,.32); }
.tg-btn-ghost { background: #fff; border: 1px solid #DCE7EE; }

/* Colour is set with the body prefix so it outranks `body.tg-body a`,
   which is a more specific selector than a bare class and was therefore
   painting the primary button's label teal on a teal background. It only
   became readable on hover because `.tg-btn-primary:hover` finally
   outweighed `body.tg-body a:hover`. All four states are pinned here. */
body.tg-body .tg-btn-primary,
body.tg-body .tg-btn-primary:link,
body.tg-body .tg-btn-primary:visited,
body.tg-body .tg-btn-primary:hover,
body.tg-body .tg-btn-primary:focus,
body.tg-body .tg-btn-primary:active { color: #fff; }

body.tg-body .tg-btn-ghost,
body.tg-body .tg-btn-ghost:link,
body.tg-body .tg-btn-ghost:visited,
body.tg-body .tg-btn-ghost:hover,
body.tg-body .tg-btn-ghost:focus,
body.tg-body .tg-btn-ghost:active { color: #082B5C; }

body.tg-body .tg-btn-primary:hover { background: #082B5C; transform: translateY(-2px); }
body.tg-body .tg-btn-ghost:hover { background: #F5F8FA; border-color: #082B5C; }

/* Visible keyboard focus, without showing a ring on mouse clicks. */
.tg-btn:focus-visible {
  outline: 3px solid #082B5C;
  outline-offset: 3px;
}
.tg-btn-ghost:focus-visible { outline-color: #0095A9; }

/* Header cart button */
.tg-cart-btn { position: relative; }
.tg-cart-count {
  position: absolute; top: -5px; right: -5px; min-width: 18px; height: 18px;
  padding: 0 5px; border-radius: 9px; background: #0095A9; color: #fff;
  font-family: 'Manrope', sans-serif; font-size: 11px; font-weight: 700;
  display: none; place-items: center; line-height: 1;
}

/* Cart page */
.tg-cart-grid { display: grid; grid-template-columns: minmax(0,1fr) 360px; gap: 28px; align-items: start; }
.tg-cart-items { display: flex; flex-direction: column; gap: 14px; }
.tg-cart-item {
  display: grid; grid-template-columns: 120px minmax(0,1fr) auto; gap: 18px;
  align-items: center; background: #fff; border: 1px solid #E6ECF2;
  border-radius: 18px; padding: 16px;
}
.tg-cart-thumb { width: 120px; height: 88px; object-fit: cover; border-radius: 12px; }
.tg-cart-name {
  font-family: 'Sora', sans-serif; font-size: 16.5px; font-weight: 600;
  color: #082B5C; text-decoration: none; line-height: 1.35;
}
.tg-cart-name:hover { color: #0095A9; }
.tg-cart-meta {
  display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 8px;
  font-size: 13px; color: #6B7A92;
}
.tg-cart-meta span::before { content: '· '; color: #B7C2D0; }
.tg-cart-meta span:first-child::before { content: ''; }
.tg-cart-controls { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; margin-top: 12px; }
.tg-cart-controls label {
  display: flex; flex-direction: column; gap: 4px;
  font-size: 10.5px; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; color: #8A97AC;
}
.tg-cart-controls input {
  width: 74px; font-family: 'Manrope', sans-serif; font-size: 14px; color: #172033;
  border: 1.5px solid #E6ECF2; border-radius: 10px; padding: 8px 10px; outline: none;
}
.tg-cart-controls input:focus { border-color: #0095A9; box-shadow: 0 0 0 3px rgba(0,149,169,.12); }
.tg-cart-remove {
  border: 0; background: none; cursor: pointer; padding: 8px 0;
  font-family: 'Manrope', sans-serif; font-size: 13px; font-weight: 600; color: #5A6B85;
}
.tg-cart-remove:hover { text-decoration: underline; }
.tg-cart-price {
  font-family: 'Sora', sans-serif; font-size: 15px; font-weight: 600;
  color: #082B5C; text-align: right; white-space: nowrap;
}

.tg-cart-side { position: sticky; top: 98px; }
.tg-cart-summary {
  background: #fff; border: 1px solid #E1E8EF; border-radius: 20px; padding: 24px;
  box-shadow: 0 20px 48px rgba(8,43,92,.10);
}
.tg-cart-summary-head {
  font-family: 'Sora', sans-serif; font-size: 17px; font-weight: 600;
  color: #082B5C; margin-bottom: 14px;
}
.tg-cart-line {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 0; border-bottom: 1px solid #EDF1F5; font-size: 14px; color: #5A6B85;
}
.tg-cart-line strong { color: #172033; }
.tg-cart-total {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 0 6px; font-size: 15px; font-weight: 700; color: #082B5C;
}
.tg-cart-total strong { font-family: 'Sora', sans-serif; font-size: 17px; color: #0095A9; }
.tg-cart-note {
  font-size: 12.5px; line-height: 1.6; color: #5A6B85; background: #F0F7F9;
  border: 1px solid #D6E9ED; border-radius: 12px; padding: 12px 14px; margin: 10px 0 0;
}
.tg-cart-checkout { width: 100%; margin-top: 16px; }
.tg-cart-side .tg-btn-ghost { width: 100%; margin-top: 10px; }
.tg-cart-nopay { font-size: 12px; color: #8A97AC; text-align: center; margin: 12px 0 0; }

.tg-cart-empty {
  background: #F5F8FA; border: 1px solid #E6ECF2; border-radius: 22px;
  padding: clamp(28px,5vw,56px); text-align: center;
}
.tg-cart-empty-title { font-family: 'Sora', sans-serif; font-size: 22px; font-weight: 600; color: #082B5C; }
.tg-cart-empty p { font-size: 15px; line-height: 1.7; color: #4A5A75; margin: 10px auto 0; max-width: 460px; }
.tg-cart-empty-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 22px; }
.tg-cart-loading { font-size: 15px; color: #6B7A92; padding: 30px 0; }

/* Checkout */
.tg-checkout-grid { display: grid; grid-template-columns: minmax(0,1fr) 380px; gap: 30px; align-items: start; }
.tg-checkout-form { background: #fff; border: 1px solid #E6ECF2; border-radius: 20px; padding: 28px; }
.tg-co-row { display: flex; gap: 16px; }
.tg-co-row > .tg-co-field { flex: 1 1 0; min-width: 0; }
.tg-co-field { display: block; margin-bottom: 16px; }
.tg-co-field > span {
  display: block; font-size: 11px; font-weight: 700; letter-spacing: .11em;
  text-transform: uppercase; color: #8A97AC; margin-bottom: 7px;
}
.tg-co-field > span b { color: #0095A9; }
.tg-co-field input, .tg-co-field textarea, .tg-co-field select {
  width: 100%; font-family: 'Manrope', sans-serif; font-size: 15px; color: #172033;
  background: #fff; border: 1.5px solid #E6ECF2; border-radius: 12px;
  padding: 13px 15px; outline: none; transition: border-color .2s ease, box-shadow .2s ease;
}
.tg-co-field textarea { resize: vertical; min-height: 100px; line-height: 1.6; }
.tg-co-field input:focus, .tg-co-field textarea:focus, .tg-co-field select:focus {
  border-color: #0095A9; box-shadow: 0 0 0 3px rgba(0,149,169,.12);
}
.tg-checkout-summary { position: sticky; top: 98px; background: #fff; border: 1px solid #E1E8EF;
  border-radius: 20px; padding: 24px; box-shadow: 0 20px 48px rgba(8,43,92,.10); }
.tg-co-item { padding: 14px 0; border-bottom: 1px solid #EDF1F5; }
.tg-co-name { font-family: 'Sora', sans-serif; font-size: 15px; font-weight: 600; color: #082B5C; line-height: 1.4; }
.tg-co-meta { font-size: 12.5px; color: #6B7A92; margin-top: 5px; line-height: 1.6; }
.tg-co-price { font-size: 13.5px; font-weight: 700; color: #0095A9; margin-top: 6px; }
.tg-co-submit { width: 100%; margin-top: 8px; }
.tg-hp-field { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

/* Success */
.tg-success-card {
  background: #fff; border: 1px solid #E1E8EF; border-radius: 22px;
  padding: clamp(26px,4vw,44px); box-shadow: 0 24px 60px rgba(8,43,92,.12);
}
.tg-success-ref {
  display: inline-block; background: #F0F7F9; border: 1px solid #D6E9ED;
  border-radius: 12px; padding: 12px 18px; margin-top: 16px;
  font-family: 'Sora', sans-serif; font-size: 20px; font-weight: 600; color: #082B5C;
}

@media (max-width: 1019px) {
  .tg-cart-grid, .tg-checkout-grid { grid-template-columns: minmax(0,1fr); }
  .tg-cart-side, .tg-checkout-summary { position: static; }
}
@media (max-width: 640px) {
  .tg-cart-item { grid-template-columns: 84px minmax(0,1fr); }
  .tg-cart-thumb { width: 84px; height: 64px; }
  .tg-cart-price { grid-column: 1 / -1; text-align: left; }
  .tg-co-row { display: block; }
  .tg-checkout-form { padding: 20px; }
}

/* ==========================================================================
   Mobile hardening — 360 / 390 / 430 / 768
   The existing breakpoints stopped at 560px, so a 360px phone was styled by
   rules written for a 560px one. These add the narrow tier and fix the
   specific overflow risks introduced by the cart and visa forms.
   ========================================================================== */

/* Shared: nothing may force the document wider than the screen. */
.tg-cart-app, .tg-checkout-grid, .tg-cart-grid, .tg-success-card { max-width: 100%; }
.tg-cart-app *, .tg-checkout-grid * { min-width: 0; }

/* Touch targets: 44px minimum on the controls people actually tap. */
@media (max-width: 768px) {
  .tg-btn { min-height: 48px; padding: 14px 20px; width: 100%; }
  .tg-cart-empty-actions .tg-btn { width: auto; }
  .tg-co-field input, .tg-co-field textarea, .tg-co-field select { font-size: 16px; }
  /* 16px stops iOS zooming the page in when a field is focused, which is
     what pushes the layout wider than the viewport. */
  .tg-cart-controls input { font-size: 16px; min-height: 44px; }
  .tg-cart-remove { min-height: 44px; }
}

/* Cart rows become stacked cards rather than a squeezed three-column grid. */
@media (max-width: 560px) {
  .tg-cart-item {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
    padding: 14px;
  }
  .tg-cart-thumb { width: 100%; height: 160px; }
  .tg-cart-price { text-align: left; font-size: 16px; }
  .tg-cart-controls { gap: 10px; }
  .tg-cart-controls label { flex: 1 1 40%; }
  .tg-cart-controls input { width: 100%; }
  .tg-cart-remove { flex: 1 1 100%; text-align: left; }
  .tg-cart-summary, .tg-checkout-summary { padding: 20px; }
}

/* Narrow phones. */
@media (max-width: 430px) {
  .tg-cart-empty { padding: 24px 18px; }
  .tg-cart-empty-actions { flex-direction: column; }
  .tg-cart-empty-actions .tg-btn { width: 100%; }
  .tg-success-ref { font-size: 17px; padding: 10px 14px; word-break: break-all; }
  .tg-co-meta, .tg-cart-meta { font-size: 12.5px; }
}

@media (max-width: 380px) {
  .tg-cart-thumb { height: 132px; }
  .tg-btn { font-size: 13.5px; letter-spacing: .04em; padding: 14px 14px; }
  .tg-cart-summary-head { font-size: 16px; }
}

/* ---------- Visa option selector (UAE only) ---------- */

.tg-visa-options {
  background: #F5F8FA;
  border: 1px solid #E6ECF2;
  border-radius: 14px;
  padding: 16px 18px;
  margin: 0 0 18px;
}
.tg-visa-optgroup + .tg-visa-optgroup { margin-top: 14px; }
.tg-choice-row { display: flex; gap: 8px; margin-top: 8px; }
.tg-choice { flex: 1 1 0; min-width: 0; position: relative; cursor: pointer; }
.tg-choice input {
  position: absolute; opacity: 0; width: 100%; height: 100%;
  margin: 0; cursor: pointer; inset: 0;
}
.tg-choice span {
  display: flex; align-items: center; justify-content: center;
  min-height: 46px; padding: 11px 10px; text-align: center;
  font-family: 'Manrope', sans-serif; font-size: 13.5px; font-weight: 600;
  color: #5A6B85; background: #fff;
  border: 1.5px solid #E6ECF2; border-radius: 12px;
  transition: all .2s ease;
}
.tg-choice input:checked + span {
  border-color: #0095A9;
  background: rgba(0, 149, 169, .07);
  color: #00707F;
}
.tg-choice input:focus-visible + span {
  outline: 2px solid #0095A9;
  outline-offset: 2px;
}
.tg-choice:hover span { border-color: #B7C2D0; }
.tg-choice input:checked + span:hover { border-color: #0095A9; }

@media (max-width: 430px) {
  .tg-choice-row { flex-direction: column; }
  .tg-choice span { min-height: 48px; }
}

/* Child age rule shown beside a cart line price. */
.tg-cart-rule {
  display: block;
  margin-top: 5px;
  font-size: 11.5px;
  font-weight: 500;
  color: #6B7A92;
  line-height: 1.5;
  max-width: 190px;
}
@media (max-width: 560px) { .tg-cart-rule { max-width: 100%; } }


/* A3.11 — server-priced promotion controls */
.tg-promo-box{margin:14px 0 12px;padding:12px;border:1px solid #e3eaf0;border-radius:12px;background:#fff}
.tg-promo-row{display:flex;gap:8px}.tg-promo-input{min-width:0;flex:1;padding:10px 12px;border:1px solid #ccd7e2;border-radius:9px;text-transform:uppercase}
.tg-promo-apply{padding:10px 14px;border:0;border-radius:9px;background:#082b5c;color:#fff;font-weight:700;cursor:pointer}
.tg-promo-error{margin-top:8px;color:#a12622;font-size:12px}.tg-promo-ok{margin-top:8px;color:#087b67;font-size:12px;font-weight:700}
@media(max-width:430px){.tg-promo-row{flex-direction:column}.tg-promo-apply{width:100%}}
\n\n/* A4.35 — cart containment: long age/variant rules must never escape a line card. */
.tg-cart-item { overflow: hidden; }
.tg-cart-body { min-width: 0; overflow-wrap: anywhere; }
.tg-cart-price {
  min-width: 0;
  width: min(210px, 22vw);
  max-width: 210px;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: normal;
}
.tg-cart-price > :first-child { white-space: nowrap; }
.tg-cart-rule {
  white-space: normal !important;
  overflow-wrap: anywhere;
  word-break: normal;
  max-width: 100%;
}
@media (max-width: 900px) {
  .tg-cart-price { width: auto; max-width: 100%; }
}
