/* ==================================================================
   GWP ITINERARY READER — styles for the in-page PDF reader and the
   "Save to your phone" dialog. Adapted from the supplied itinerary
   package (Honolulu x GWP, Montenegro 2027). The landing/CTA part of
   that package is NOT used here: the site's own closing page
   (#section-closing, styled in index.html) is the CTA and opens this
   reader. Reader/dialog rules keep the package's values; generic
   element rules are scoped to the dialogs so they can't restyle the
   closing page's button and links.
   ================================================================== */

/* Inter, self-hosted (Latin subset of the package's fonts, SIL OFL —
   see fonts/inter-OFL.txt). Separate family name so these real
   600/700 weights apply only to the closing page and reader, without
   changing how the rest of the site renders Inter. */
@font-face{font-family:"GWP Inter";font-style:normal;font-weight:400;font-display:swap;src:url("fonts/inter-400.woff") format("woff")}
@font-face{font-family:"GWP Inter";font-style:normal;font-weight:500;font-display:swap;src:url("fonts/inter-500.woff") format("woff")}
@font-face{font-family:"GWP Inter";font-style:normal;font-weight:600;font-display:swap;src:url("fonts/inter-600.woff") format("woff")}
@font-face{font-family:"GWP Inter";font-style:normal;font-weight:700;font-display:swap;src:url("fonts/inter-700.woff") format("woff")}

/* Design tokens — matched to the closing page (client mockup). */
.gwp-itinerary {
  --gwp-navy:#05161D; --gwp-gold:#CBAD6F; --gwp-gold-light:#D2B269;
  --gwp-cream:#FCF9F2; --gwp-muted:#CAD3D8; --gwp-secondary:#B1BEC6;
  --gwp-line:#ffffff25; --gwp-panel:#10313b;
  --gwp-body:"GWP Inter",Inter,Arial,sans-serif;
}
.gwp-itinerary *, .gwp-itinerary *::before, .gwp-itinerary *::after {box-sizing:border-box}
.gwp-itinerary [hidden] {display:none!important}
.gwp-itinerary :focus-visible {outline:3px solid var(--gwp-gold-light);outline-offset:3px}

/* Generic element rules — dialogs only. */
.gwp-itinerary dialog {font-family:var(--gwp-body);line-height:1.5;text-align:left;color-scheme:dark}
.gwp-itinerary dialog button, .gwp-itinerary dialog select, .gwp-itinerary dialog a {font:inherit;-webkit-tap-highlight-color:transparent}
.gwp-itinerary dialog button, .gwp-itinerary dialog a {touch-action:manipulation}
.gwp-itinerary dialog button {cursor:pointer}
.gwp-itinerary dialog button:disabled {cursor:default;opacity:.45}
.gwp-itinerary dialog button, .gwp-itinerary dialog select {color:inherit}
.gwp-itinerary dialog a {color:var(--gwp-gold-light)}
.gwp-itinerary dialog .gwp-primary {display:flex;justify-content:space-between;align-items:center;gap:14px;width:100%;min-height:54px;padding:15px 18px;border:0;border-radius:6px;background:var(--gwp-gold);color:var(--gwp-navy);font-weight:700;font-size:13px;letter-spacing:.6px;line-height:1.4;text-decoration:none;text-align:left}
.gwp-itinerary dialog .gwp-primary:hover {background:var(--gwp-gold-light)}
.gwp-itinerary dialog .gwp-primary span {font-size:21px;line-height:1}

/* Reader */
.gwp-itinerary .gwp-reader {width:min(880px,100%);height:calc(100dvh - 40px);max-width:100%;max-height:calc(100dvh - 40px);padding:0;margin:auto;border:1px solid #31505b;border-radius:12px;background:var(--gwp-navy);color:var(--gwp-cream);overflow:hidden}
.gwp-itinerary dialog::backdrop {background:#001014c9;backdrop-filter:blur(5px)}
.gwp-itinerary .gwp-reader-shell {display:flex;flex-direction:column;height:100%;min-height:0}
.gwp-itinerary .gwp-reader-header {display:flex;justify-content:space-between;align-items:center;gap:14px;flex-shrink:0;padding:14px 18px 10px}
.gwp-itinerary .gwp-reader-eyebrow {margin:0 0 3px;font-size:10px;letter-spacing:1.7px;color:var(--gwp-gold-light)}
.gwp-itinerary .gwp-reader h2 {margin:0;font-size:17px;line-height:1.3;font-weight:600}
.gwp-itinerary .gwp-icon-button {display:grid;place-items:center;min-width:44px;min-height:44px;padding:0;border:1px solid var(--gwp-line);border-radius:5px;background:transparent;font-size:27px;line-height:1}
.gwp-itinerary .gwp-reader-tools {display:flex;align-items:center;justify-content:space-between;gap:12px;padding:0 18px 12px;flex-shrink:0;border-bottom:1px solid var(--gwp-line)}
.gwp-itinerary .gwp-reader-tools button, .gwp-itinerary .gwp-page-navigation button {display:inline-flex;align-items:center;justify-content:center;gap:7px;min-height:44px;padding:8px 12px;border:1px solid var(--gwp-line);border-radius:5px;background:var(--gwp-panel);font-size:12px;font-weight:500}
.gwp-itinerary select {width:100%;min-width:0;max-width:450px;min-height:44px;padding:8px 30px 8px 10px;border:1px solid var(--gwp-line);border-radius:5px;background:var(--gwp-panel);font-size:16px;overflow:hidden;text-overflow:ellipsis}
.gwp-itinerary .gwp-reader-scroll {flex:1;min-height:0;overflow:auto;overscroll-behavior:contain;background:#d5d4ce;padding:20px 22px;scrollbar-gutter:stable}
.gwp-itinerary .gwp-page-stage {position:relative;max-width:680px;margin:0 auto;background:#faf7f0;touch-action:pan-y pinch-zoom;box-shadow:0 3px 18px #0002}
.gwp-itinerary .gwp-page-image {display:block;width:100%;height:auto;user-select:none;-webkit-user-select:none}
.gwp-itinerary .gwp-page-links {position:absolute;inset:0;pointer-events:none}
.gwp-itinerary .gwp-page-links a, .gwp-itinerary .gwp-page-links button {position:absolute;display:block;padding:0;min-width:0;border:0;border-radius:0;background:transparent;color:transparent;pointer-events:auto;text-decoration:none}
.gwp-itinerary .gwp-page-links a:hover, .gwp-itinerary .gwp-page-links button:hover {background:#ba984918}
.gwp-itinerary .gwp-page-links :focus-visible {outline:3px solid #ae8935;outline-offset:0;background:#b9984930}
.gwp-itinerary .gwp-page-transcript {max-width:680px;margin:15px auto 0;color:#12323c;font-size:14px}
.gwp-itinerary .gwp-page-transcript summary {padding:10px 0;cursor:pointer}
.gwp-itinerary .gwp-page-transcript div {white-space:pre-line;padding:14px;background:#faf7f0;line-height:1.6}
.gwp-itinerary .gwp-reader-footer {flex-shrink:0;padding:10px 18px max(8px,env(safe-area-inset-bottom));border-top:1px solid var(--gwp-line)}
.gwp-itinerary .gwp-page-navigation {display:flex;justify-content:space-between;align-items:center;gap:12px}
.gwp-itinerary .gwp-page-counter {color:var(--gwp-gold-light);font-size:12px;font-variant-numeric:tabular-nums}
.gwp-itinerary .gwp-save-actions {display:grid;grid-template-columns:.85fr 1.35fr .85fr;gap:8px;margin-top:8px}
.gwp-itinerary .gwp-save-actions a, .gwp-itinerary .gwp-save-actions button {display:flex;align-items:center;justify-content:center;gap:5px;min-height:44px;padding:8px 4px;border:0;border-radius:4px;background:transparent;font-size:12px;font-weight:500;line-height:1.25;text-align:center;text-decoration:none;color:var(--gwp-gold-light)}
.gwp-itinerary .gwp-save-actions button[data-gwp-save-page] {background:var(--gwp-gold);color:var(--gwp-navy);font-weight:600}
.gwp-itinerary .gwp-status {min-height:0;margin:0;font-size:11px;line-height:1.4;color:var(--gwp-secondary);text-align:center}
.gwp-itinerary .gwp-status:not(:empty) {margin-top:8px}
.gwp-itinerary .gwp-page-error {max-width:680px;margin:20px auto;color:#173942;font-size:15px;text-align:center}
.gwp-itinerary .gwp-page-error a {color:#173942}
.gwp-itinerary .gwp-page-error button {min-height:44px;color:#173942}

/* Save-to-phone dialog */
.gwp-itinerary .gwp-save-dialog {width:min(420px,calc(100% - 24px));max-height:calc(100dvh - 32px);padding:0;border:1px solid #31505b;border-radius:10px;background:var(--gwp-navy);color:var(--gwp-cream);overflow:auto;overscroll-behavior:contain}
.gwp-itinerary .gwp-save-header {display:flex;align-items:center;justify-content:space-between;gap:12px;padding:16px 18px;border-bottom:1px solid var(--gwp-line)}
.gwp-itinerary .gwp-save-header h2 {margin:0;font-size:18px;line-height:1.3}
.gwp-itinerary .gwp-save-body {padding:18px}
.gwp-itinerary .gwp-save-instructions {margin:0 0 15px;font-size:14px;color:var(--gwp-muted);line-height:1.6}
.gwp-itinerary .gwp-save-image {display:block;max-width:100%;height:auto;margin-bottom:16px;-webkit-touch-callout:default;user-select:auto;-webkit-user-select:auto}
.gwp-itinerary .gwp-save-status {margin:0 0 14px;font-size:13px;color:var(--gwp-gold-light)}
.gwp-itinerary .gwp-secondary {display:flex;justify-content:space-between;align-items:center;gap:12px;min-height:48px;margin-top:10px;padding:10px 0;font-size:13px;text-decoration:none}
.gwp-itinerary .gwp-sr-only {position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.gwp-itinerary .gwp-no-script {margin-top:16px;font-size:13px;line-height:1.5;color:var(--gwp-secondary)}

@media (max-width:600px) {
  .gwp-itinerary .gwp-reader {width:100%;height:100dvh;max-height:100dvh;margin:0;border:0;border-radius:0}
  .gwp-itinerary .gwp-reader-header {padding-top:max(10px,env(safe-area-inset-top))}
  .gwp-itinerary .gwp-reader-scroll {padding:12px 8px;scrollbar-gutter:auto}
  .gwp-itinerary .gwp-reader-tools, .gwp-itinerary .gwp-reader-header {padding-left:12px;padding-right:12px}
  .gwp-itinerary .gwp-reader-footer {padding-left:12px;padding-right:12px}
  /* Phones: one main action. Save-page-image / All-images are hidden;
     Download PDF becomes the full-width gold button. */
  .gwp-itinerary .gwp-save-actions {grid-template-columns:1fr;margin-top:10px}
  .gwp-itinerary .gwp-save-actions [data-gwp-save-page],
  .gwp-itinerary .gwp-save-actions [data-gwp-save-all] {display:none}
  .gwp-itinerary .gwp-save-actions a.gwp-download-pdf {min-height:48px;gap:8px;border-radius:6px;
    background:var(--gwp-gold);color:var(--gwp-navy);font-size:15px;font-weight:700}
  .gwp-itinerary .gwp-save-actions a.gwp-download-pdf span {font-size:12px}
}
@media (max-width:360px) {
  .gwp-itinerary .gwp-save-actions {gap:4px}
  .gwp-itinerary .gwp-save-actions a,.gwp-itinerary .gwp-save-actions button {font-size:11px}
}
@media (prefers-reduced-motion:no-preference) {.gwp-itinerary dialog .gwp-primary {transition:background-color .15s ease}}
