:root {
  --sky-top: #0f3d5e;
  --sky-mid: #2f6f86;
  --sun: #f2b263;
  --sand: #fbf1e0;
  --paper: #fffaf2;
  --ink: #10263a;
  --muted: #5d6b78;
  --rose: #b8476a;
  --line: #ead9bf;
  font-family: "Rubik", system-ui, sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; background: var(--sand); color: var(--ink); }
body { min-height: 100dvh; font-size: 15px; line-height: 1.6; }
button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--rose); outline-offset: 2px; }

.sky {
  position: relative; overflow: hidden; padding: 26px 18px 22px; color: var(--sand);
  background: linear-gradient(180deg, var(--sky-top) 0%, var(--sky-mid) 58%, #c98c5a 100%);
}
.sun {
  position: absolute; inset-inline-start: -40px; top: -60px; width: 220px; height: 220px; border-radius: 50%;
  background: radial-gradient(circle, #ffd89a 0%, var(--sun) 45%, rgba(242, 178, 99, 0) 70%); opacity: .85;
}
.sky h1 { position: relative; margin: 0; font-family: "El Messiri", serif; font-weight: 700; font-size: 48px; line-height: 1.1; }
.tag { position: relative; margin: 4px 0 18px; opacity: .9; max-width: 34ch; }

.trip { position: relative; display: grid; gap: 10px; max-width: 720px; }
.trip label { display: grid; gap: 2px; background: rgba(255, 250, 242, .96); color: var(--ink); border-radius: 12px; padding: 7px 12px 8px; }
.trip label span { font-size: 12px; color: var(--muted); }
.trip select, .trip input { border: 0; background: transparent; padding: 0; font-size: 16px; font-weight: 600; width: 100%; min-width: 0; }
.route { display: grid; grid-template-columns: 1fr auto 1fr; gap: 8px; align-items: stretch; }
.swap { align-self: center; width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--sun); color: var(--ink); font-size: 18px; cursor: pointer; }
.dates { display: grid; grid-template-columns: 1fr 1fr 96px; gap: 8px; }
.trip input[type="date"] { font-size: 15px; }

.tabs { display: flex; gap: 4px; padding: 0 18px; background: var(--paper); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.tabs button { flex: 1; max-width: 160px; border: 0; background: none; padding: 13px 6px 11px; font-weight: 600; color: var(--muted); border-bottom: 3px solid transparent; cursor: pointer; }
.tabs button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--rose); }

main { padding: 16px 18px 28px; max-width: 760px; }
.cta { width: 100%; max-width: 720px; border: 0; border-radius: 14px; padding: 14px; background: var(--ink); color: var(--sand); font-weight: 600; font-size: 16px; cursor: pointer; }
.cta:disabled { opacity: .55; cursor: progress; }
.status { color: var(--muted); }
.error { margin-top: 12px; padding: 12px 14px; border-radius: 12px; background: #fff; border: 1px solid #e8b4c4; }
.error p { margin: 0 0 8px; } .error p:last-child { margin: 0; }
.error-action { display: inline-block; border: 0; border-radius: 10px; background: var(--rose); color: #fff; padding: 7px 14px; text-decoration: none; font-weight: 600; cursor: pointer; }
.empty { color: var(--muted); }
.sort { display: flex; gap: 6px; margin: 14px 0 4px; }
.sort button { border: 1px solid var(--line); background: var(--paper); border-radius: 999px; padding: 5px 12px; font-size: 13px; cursor: pointer; }
.sort button[aria-pressed="true"] { background: var(--ink); color: var(--sand); border-color: var(--ink); }

/* boarding passes */
.passes { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 14px; }
.pass {
  position: relative; display: grid; grid-template-columns: 1fr 112px; background: var(--paper); border-radius: 16px;
  box-shadow: 0 1px 0 var(--line), 0 10px 24px rgba(16, 38, 58, .07);
}
.pass-main { padding: 14px 16px; border-inline-end: 2px dashed var(--line); }
.pass-airline { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.pass-airline img { width: 22px; height: 22px; object-fit: contain; }
.legs { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; margin-top: 8px; direction: rtl; }
.code { font-family: "El Messiri", serif; font-weight: 700; font-size: 26px; line-height: 1; letter-spacing: 1px; direction: ltr; }
.time { display: block; font-size: 13px; color: var(--muted); }
.track { position: relative; text-align: center; font-size: 12px; color: var(--muted); }
.track::before { content: ""; display: block; height: 0; border-top: 2px dotted var(--sky-mid); margin: 8px 0 4px; }
.direct { color: #2e7d55; font-weight: 600; }
.pass-side { display: grid; place-content: center; text-align: center; padding: 12px 8px; gap: 6px; }
.price { font-family: "El Messiri", serif; font-weight: 700; font-size: 22px; line-height: 1.1; }
.price small { display: block; font-family: "Rubik", sans-serif; font-weight: 400; font-size: 11px; color: var(--muted); }
.book { display: inline-block; border-radius: 10px; background: var(--rose); color: #fff; text-decoration: none; padding: 6px 10px; font-size: 13px; font-weight: 600; }

/* hotels */
.hotels { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 14px; }
.hotel { display: grid; grid-template-columns: 112px 1fr; background: var(--paper); border-radius: 16px; overflow: hidden; box-shadow: 0 1px 0 var(--line); }
.hotel img { width: 112px; height: 100%; min-height: 112px; object-fit: cover; background: var(--line); }
.hotel .noimg { background: linear-gradient(160deg, var(--sky-mid), var(--sun)); }
.hotel-body { padding: 10px 12px; }
.hotel h3 { margin: 0; font-size: 16px; line-height: 1.4; }
.hotel .meta { color: var(--muted); font-size: 13px; }
.hotel .night { font-family: "El Messiri", serif; font-weight: 700; font-size: 19px; }
.hotel .night small { font-family: "Rubik", sans-serif; font-weight: 400; font-size: 12px; color: var(--muted); }
.rating { color: #a8631f; font-weight: 600; }

/* weather */
.weather { margin-top: 14px; }
.weather h2 { font-family: "El Messiri", serif; margin: 0 0 4px; font-size: 22px; }
.days { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 10px; margin-top: 10px; }
.day { background: var(--paper); border-radius: 14px; padding: 12px; box-shadow: 0 1px 0 var(--line); }
.day b { display: block; font-size: 14px; }
.day .temp { font-family: "El Messiri", serif; font-weight: 700; font-size: 26px; line-height: 1.2; }
.day .temp small { font-size: 15px; color: var(--muted); font-weight: 500; }
.day p { margin: 2px 0 0; font-size: 13px; color: var(--muted); }
.note { color: var(--muted); font-size: 13px; }

.credit { padding: 6px 18px 26px; color: var(--muted); font-size: 12px; max-width: 760px; }
@media (min-width: 760px) {
  .sky { padding: 40px max(18px, calc(50% - 360px)) 30px; }
  .tabs, main, .credit { padding-inline: max(18px, calc(50% - 360px)); max-width: none; }
}
@media (max-width: 480px) { .dates { grid-template-columns: 1fr 1fr; } .pax { grid-column: 1 / -1; grid-template-columns: auto 1fr; align-items: center; gap: 10px; } }
