/* RIO FLIGHT EXPERIENCE — glass finish. Layout-only: photographs and behaviour are untouched. */
body.dark-theme {
  --glass-line: rgba(204, 221, 239, .18);
  --glass-gold: rgba(221, 192, 139, .30);
  --glass-shadow: 0 18px 46px rgba(0, 5, 15, .25), inset 0 1px 0 rgba(235, 245, 255, .12);
  background:
    radial-gradient(ellipse 95% 35% at 8% 22%, rgba(47, 103, 148, .22), transparent 72%),
    radial-gradient(ellipse 70% 27% at 98% 45%, rgba(42, 81, 118, .24), transparent 70%),
    radial-gradient(ellipse 65% 25% at 9% 72%, rgba(144, 116, 67, .10), transparent 75%),
    linear-gradient(145deg, #07111f, #0a1829 42%, #071321 76%, #060f1c);
}

/* Frosted panels have a pearl edge and a quiet, directional reflection. */
body.dark-theme .header,
body.dark-theme .search-bar,
body.dark-theme .filter-panel,
body.dark-theme .experience-card,
body.dark-theme .signature,
body.dark-theme .empty-state,
body.dark-theme .detail-dialog,
body.dark-theme .info-dialog,
body.dark-theme .booking-dialog {
  background:
    linear-gradient(125deg, rgba(223, 237, 255, .10), rgba(206, 225, 250, .025) 32%, rgba(208, 179, 123, .035) 100%),
    rgba(10, 26, 45, .77);
  border-color: var(--glass-line);
  box-shadow: var(--glass-shadow);
  -webkit-backdrop-filter: blur(22px) saturate(135%);
  backdrop-filter: blur(22px) saturate(135%);
}
body.dark-theme .header {
  background: linear-gradient(110deg, rgba(192, 219, 249, .095), rgba(218, 188, 132, .025)), rgba(7, 20, 36, .80);
  border-bottom-color: rgba(230, 208, 164, .21);
  box-shadow: 0 12px 40px #01091525, inset 0 1px 0 #eaf5ff0d;
}
body.dark-theme .presentation-return {
  background: rgba(5, 15, 28, .72);
  border-bottom-color: #d6bb8420;
}
body.dark-theme .search-bar {
  border-radius: 15px;
  border-color: rgba(228, 211, 175, .26);
  background: linear-gradient(118deg, #e5f1ff17, #d2e7ff08 38%, #d7b57a0b), #0b1d32c9;
  box-shadow: 0 24px 55px #02091442, inset 0 1px 0 #fff6df30, inset 0 -1px 0 #ffffff07;
}
body.dark-theme .search-field { border-color: #d9e8fa21; }
body.dark-theme .search-field label>span { color: #c2cddc; }
body.dark-theme .search-field input,
body.dark-theme .search-field select { background-color: transparent; color: #f4eee4; }

/* Gold controls keep an opaque, readable face over translucent panels. */
body.dark-theme .primary,
body.dark-theme .rb-button:not(.secondary):not(.text):not(.danger) {
  color: #071727;
  background: linear-gradient(118deg, #f0d9aa 0%, #dec18a 30%, #c4a267 70%, #e6cc97 100%);
  border-color: #eddaa7b8;
  box-shadow: inset 0 1px 0 #fff7deaa, inset 0 -1px 0 #9d774c66, 0 5px 22px #c7a46d12;
  border-radius: 10px;
}
body.dark-theme .primary:hover,
body.dark-theme .rb-button:not(.secondary):not(.text):not(.danger):hover {
  color: #071727;
  background: linear-gradient(115deg, #f7e4ba, #e5c995 48%, #d1ae72);
  border-color: #f7e4b7;
  box-shadow: inset 0 1px 0 #fff8e7c9, 0 7px 27px #dfbd7f24;
}
body.dark-theme .trips-button,
body.dark-theme .tab,
body.dark-theme .filter-button,
body.dark-theme .card-cta,
body.dark-theme .rb-button.secondary {
  background: linear-gradient(135deg, #e4efff0d, #c0d9f605), #0b1d3026;
  border-color: #d2dfef2e;
  box-shadow: inset 0 1px 0 #f1f7ff0e, 0 3px 12px #01081512;
  border-radius: 9px;
  color: #e5d1aa;
}
body.dark-theme .trips-button:hover,
body.dark-theme .filter-button:hover,
body.dark-theme .tab:hover:not(.active),
body.dark-theme .card-cta:hover,
body.dark-theme .rb-button.secondary:hover {
  background: linear-gradient(125deg, #dfebff1c, #debb7911), #10283c66;
  border-color: #debe8175;
  color: #f4ddb0;
}
body.dark-theme .tab.active {
  color: #071727;
  background: linear-gradient(118deg, #ead0a0, #c4a268 78%, #dcc18e);
  border-color: #e7ce9b;
  box-shadow: inset 0 1px 0 #fff3d58c, 0 3px 15px #cfb17a19;
}
body.dark-theme .filter-panel { border-radius: 12px; }
body.dark-theme .filter-panel select,
body.dark-theme .rb-input,
body.dark-theme .rb-select,
body.dark-theme .rb-guests {
  background: linear-gradient(130deg, #d8ebff06, #ffffff02), rgba(4, 17, 31, .67);
  border-color: #b1c8e139;
  box-shadow: inset 0 1px 4px #00000020, 0 1px 0 #f4f7ff06;
  border-radius: 10px;
  color: #f2eee7;
}
body.dark-theme .rb-input::placeholder { color: #a7b7cb; }
body.dark-theme select option { background: #0e2035; color: #f5efe5; }
body.dark-theme .rb-input:focus,
body.dark-theme .rb-select:focus {
  border-color: #ddbe87;
  box-shadow: 0 0 0 3px #dfbd7b20, inset 0 1px 3px #0002;
}

body.dark-theme .experience-card { border-radius: 15px; }
body.dark-theme .experience-card:hover {
  border-color: #e2c58d70;
  box-shadow: 0 20px 48px #02081455, inset 0 1px 0 #f4e4c347, 0 0 23px #aecbff05;
}
body.dark-theme .card-body {
  background: linear-gradient(140deg, #dceeff06, transparent 48%, #c9a97305);
}
body.dark-theme .card-footer,
body.dark-theme .benefits,
body.dark-theme .detail-facts,
body.dark-theme .detail-book,
body.dark-theme .source-list li { border-color: #d3e4f21c; }
body.dark-theme .card-tag,
body.dark-theme .favorite {
  background: linear-gradient(135deg, #ebf2ff1a, #d8bb8009), #09192cd6;
  border-color: #ecdfbf40;
  box-shadow: inset 0 1px 0 #fff4d521, 0 4px 18px #0002;
}
body.dark-theme .favorite.is-favorite { background: linear-gradient(130deg, #efd09b33, #b28f5524), #14273be6; }
body.dark-theme .signature { border-radius: 17px; }
body.dark-theme .signature-copy {
  background: radial-gradient(ellipse at 100% 0, #7398bc10, transparent 65%), linear-gradient(135deg, #d7e8ff08, #08172540);
}
body.dark-theme .demo-note,
body.dark-theme .detail-notes,
body.dark-theme .rb-note {
  background: linear-gradient(120deg, #e7cb9720, #ddc59609 65%, #a8c6e60c);
  border-color: #e4c78e35;
  box-shadow: inset 0 1px 0 #ffefd912;
  border-radius: 11px;
}
body.dark-theme .demo-note { color: #c3cedc; }
body.dark-theme .rb-note { color: #ddceb1; }
body.dark-theme .empty-state { border-radius: 15px; }
body.dark-theme footer {
  background: linear-gradient(125deg, #112b432e, #111c2a33 65%, #c1a16b05), rgba(4, 13, 25, .75);
  border-top-color: #dec38f22;
}
body.dark-theme .mobile-nav {
  background: linear-gradient(120deg, #e2efff12, #d9bf8707), #081a2de8;
  border-color: #e7d4af35;
  box-shadow: 0 -8px 35px #02091538, inset 0 1px 0 #eff5ff12;
  -webkit-backdrop-filter: blur(22px) saturate(135%);
  backdrop-filter: blur(22px) saturate(135%);
  border-radius: 14px 14px 0 0;
}
body.dark-theme .toast {
  background: linear-gradient(130deg, #dceaff12, #dbc4930a), #11283de8;
  border-color: #e9cc9354;
  box-shadow: 0 12px 35px #0005, inset 0 1px 0 #fff6df19;
  border-radius: 11px;
}

/* Dialog surfaces blur the page beneath once; inner fields remain crisp. */
body.dark-theme .detail-dialog,
body.dark-theme .info-dialog,
body.dark-theme .booking-dialog {
  border-radius: 18px;
  border-color: #dce6f33b;
  background: linear-gradient(125deg, #dcecff0e, #e6c68e05 50%, #6490ba09), #091a2de8;
  box-shadow: 0 30px 100px #010610a3, inset 0 1px 0 #eff6ff2b, inset 0 -1px 0 #fff3d309;
}
body.dark-theme dialog::backdrop,
body.dark-theme .booking-dialog::backdrop {
  background: rgba(2, 10, 23, .67);
  -webkit-backdrop-filter: blur(7px);
  backdrop-filter: blur(7px);
}
body.dark-theme .dialog-close,
body.dark-theme .rb-close {
  background: linear-gradient(135deg, #e0ecff1b, #e7cf9d0a), #12283dba;
  border-color: #c8d9ec38;
  box-shadow: inset 0 1px 0 #fff4df16;
}
body.dark-theme .dialog-close:hover,
body.dark-theme .rb-close:hover { background: #35516aa6; border-color: #dfbd8066; }
body.dark-theme .rb-top {
  background: linear-gradient(112deg, #b7dcff0d, #dfbc7707 75%, #d9eaff04);
  border-color: #e0edff1e;
  box-shadow: inset 0 1px 0 #ecf6ff12;
}
body.dark-theme .rb-footer {
  background: linear-gradient(115deg, #cadfff0e, #ddc28d08), #081a2df2;
  border-color: #d6e5f52a;
  box-shadow: 0 -12px 28px #020d1b33, inset 0 1px 0 #f3e5c91c;
}
body.dark-theme .rb-guests button {
  background: linear-gradient(125deg, #d8eaff14, #b4d1f308), #18314988;
  box-shadow: inset 0 1px 0 #e7f2ff12;
  border-radius: 7px;
}
body.dark-theme .rb-guests button:hover:not(:disabled) { background: #2d4e68aa; }
body.dark-theme .rb-mode span {
  background: linear-gradient(130deg, #d3e7ff09, #ffffff02), #07182a55;
  border-color: #c2d7ed30;
  border-radius: 10px;
  color: #c3cfdd;
}
body.dark-theme .rb-mode input:checked+span {
  background: linear-gradient(125deg, #ead0a325, #c7a56812), #1a2c3b77;
  border-color: #dfc087a6;
  box-shadow: inset 0 1px 0 #f6e1b532, 0 0 0 1px #c5a26b0a;
  color: #f1dab0;
}
body.dark-theme .rb-summary-box,
body.dark-theme .rb-single-mode {
  background: linear-gradient(135deg, #b6d8fc13, #dfc39008), #122b427a;
  border-color: #d4e6f72b;
  box-shadow: inset 0 1px 0 #f1f5ff0e;
  border-radius: 12px;
}
body.dark-theme .rb-meta span,
body.dark-theme .rb-saved-badge {
  background: linear-gradient(125deg, #dfc28e1d, #cfb6830d);
  border-color: #ead3a632;
  box-shadow: inset 0 1px 0 #f7ebd812;
  color: #e6d0a9;
  border-radius: 7px;
}
body.dark-theme .rb-step.active .rb-step-number {
  background: linear-gradient(135deg, #edd3a1, #c4a169);
  border-color: #ebd1a0;
  box-shadow: inset 0 1px 0 #fff3d766;
}
body.dark-theme .rb-price-row,
body.dark-theme .rb-route,
body.dark-theme .rb-trip { border-color: #d5e2f120; }
body.dark-theme .rb-success-mark {
  background: radial-gradient(circle at 28% 20%, #e8d0a031, #c3a56c10 70%);
  border-color: #e4c99650;
  box-shadow: inset 0 1px 0 #fff5dc30, 0 7px 25px #b18d5112;
}
body.dark-theme .rb-button.text { box-shadow: none; background: transparent; border-color: transparent; }
body.dark-theme .rb-button.danger {
  background: linear-gradient(130deg, #ab6e63, #874c46);
  color: #fff4e9;
  border-color: #d8a18c55;
  box-shadow: inset 0 1px 0 #f5d4b92e;
  border-radius: 9px;
}
body.dark-theme .rb-delete-confirm,
body.dark-theme .rb-error {
  background: linear-gradient(125deg, #b8775424, #915b4d16), #1a1d2bd9;
  border-color: #d8a18346;
  box-shadow: inset 0 1px 0 #efd1b512;
  border-radius: 10px;
}

/* Opaque surfaces remain readable when backdrop compositing is unavailable. */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  body.dark-theme .header,
  body.dark-theme .search-bar,
  body.dark-theme .filter-panel,
  body.dark-theme .experience-card,
  body.dark-theme .signature,
  body.dark-theme .empty-state,
  body.dark-theme .detail-dialog,
  body.dark-theme .info-dialog,
  body.dark-theme .booking-dialog,
  body.dark-theme .mobile-nav {
    background: linear-gradient(130deg, #172c42, #0c1d31 60%, #102238);
  }
}
@media(max-width:620px) {
  body.dark-theme .search-field:nth-child(1),
  body.dark-theme .search-field:nth-child(2) { border-color: #d9e8fa21; }
  body.dark-theme .header,
  body.dark-theme .search-bar,
  body.dark-theme .experience-card { -webkit-backdrop-filter: blur(16px) saturate(130%); backdrop-filter: blur(16px) saturate(130%); }
}
@media(prefers-reduced-transparency:reduce) {
  body.dark-theme .header,
  body.dark-theme .search-bar,
  body.dark-theme .filter-panel,
  body.dark-theme .experience-card,
  body.dark-theme .detail-dialog,
  body.dark-theme .info-dialog,
  body.dark-theme .booking-dialog,
  body.dark-theme .mobile-nav { background-color: #0c1e32; -webkit-backdrop-filter: none; backdrop-filter: none; }
}
