/* Shared UI — header, footer, buttons, popups. No frameworks. */

:root {
  --color-primary: #033c5d;
  --color-primary-dark: #0b2643;
  --color-secondary: #f26f21;
  --color-secondary-hover: #f48542;
  --color-accent: #ffc107;
  --color-gradient: linear-gradient(0deg, #f26f21, #f83600);
  --color-text: #333;
  --color-muted: #7b7b7b;
  --color-border: #e1e1e1;
  --color-bg: #f6f7fa;
  --color-white: #fff;
  --shadow-sm: 0 1px 10px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 8px 20px rgba(0, 0, 0, 0.18);
  --shadow-lg: 0 12px 28px rgba(3, 60, 93, 0.16);
  --radius: 6px;
  --radius-lg: 10px;
  --container: 1200px;
  --header-h: 72px;
  --font: "Roboto", Arial, sans-serif;
  --phone: 568px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  color: var(--color-text);
  background: var(--color-white);
  min-height: 100vh;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

button,
input,
select {
  font-family: inherit;
}

a {
  color: var(--color-primary);
}

button {
  cursor: pointer;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 16px;
}

.site-row {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}

.is-hidden {
  display: none !important;
}

body.no-scroll {
  overflow: hidden;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 0;
  border-radius: 4px;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  background: transparent;
  color: inherit;
}

.btn-secondary {
  background: var(--color-secondary);
  border: 1px solid var(--color-secondary);
  color: var(--color-white);
}

.btn-secondary:hover {
  background: var(--color-secondary-hover);
  border-color: #f37d37;
}

/* Icons */
.icon {
  width: 1em;
  height: 1em;
  display: inline-block;
  vertical-align: -0.15em;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon-fill {
  fill: currentColor;
  stroke: none;
}

/* Header */
.header {
  position: relative;
  z-index: 1000;
  width: 100%;
  background: var(--color-primary-dark);
  box-shadow: 0 3px 5px rgba(3, 60, 93, 0.2);
}

.header.dashboardPage {
  background: transparent;
  box-shadow: none;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--header-h);
  padding: 8px 0;
}

.logo a {
  text-decoration: none;
}

.logo-placeholder {
  display: inline-block;
  color: var(--color-white);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.2;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
  white-space: nowrap;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.support-btn {
  color: var(--color-white);
  border: 1px solid var(--color-white);
  background: transparent;
  font-weight: 400;
  padding: 8px 12px;
}

.support-btn:hover {
  background: rgba(255, 255, 255, 0.08);
}

.menu-toggle {
  display: none;
  width: 40px;
  height: 40px;
  color: var(--color-white);
  background: transparent;
  border: 0;
  font-size: 26px;
}

/* Dropdown */
.site-menu {
  position: relative;
}

.site-menu-panel {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  min-width: 240px;
  background: var(--color-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 8px 0;
  z-index: 50;
}

.site-menu.is-open .site-menu-panel {
  display: block;
}

.site-menu-panel a,
.site-menu-panel span {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  color: var(--color-primary);
  text-decoration: none;
  font-size: 14px;
}

.site-menu-panel a:hover {
  background: #f4f7fb;
}

/* Mobile drawer */
.site-drawer {
  position: fixed;
  inset: 0;
  z-index: 2000;
  pointer-events: none;
}

.site-drawer.is-open {
  pointer-events: auto;
}

.site-drawer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(3, 60, 93, 0.45);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.site-drawer.is-open .site-drawer-backdrop {
  opacity: 1;
}

.site-drawer-panel {
  position: absolute;
  top: 0;
  right: 0;
  width: min(340px, 88vw);
  height: 100%;
  background: #f4f7fb;
  transform: translateX(100%);
  transition: transform 0.25s ease;
  display: flex;
  flex-direction: column;
}

.site-drawer.is-open .site-drawer-panel {
  transform: translateX(0);
}

.site-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  background: var(--color-primary-dark);
}

.site-drawer-head .logo-placeholder {
  font-size: 1.2rem;
}

.site-drawer-close {
  width: 36px;
  height: 36px;
  border: 0;
  background: transparent;
  color: var(--color-white);
  font-size: 22px;
}

.site-drawer-welcome {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 16px 0 16px;
  padding: 14px 16px;
  width: 95%;
  background: var(--color-white);
  border-radius: 0 10px 10px 0;
}

.site-drawer-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--color-primary);
  color: var(--color-white);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.site-drawer-welcome strong,
.site-drawer-welcome span {
  display: block;
  color: var(--color-primary);
}

.site-drawer-welcome span {
  font-size: 16px;
  font-weight: 700;
}

.site-drawer-nav a,
.site-drawer-nav button {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  background: transparent;
  border: 0;
  color: var(--color-primary);
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  text-align: left;
}

.site-drawer-nav a:hover,
.site-drawer-nav button:hover {
  background: #e8eef4;
}

.site-drawer-nav .icon {
  font-size: 18px;
}

/* Footer */
.footer {
  margin-top: 32px;
  padding: 40px 0 24px;
  color: var(--color-primary);
  background: var(--color-white);
  border-top: 2px solid #eee;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr 1fr;
  gap: 24px;
}

.footer h3 {
  margin: 0 0 16px;
  font-size: 20px;
}

.footer a {
  display: block;
  width: fit-content;
  margin-bottom: 8px;
  padding: 4px 0;
  color: var(--color-primary);
  text-decoration: none;
}

.footer a:hover {
  color: rgba(3, 60, 93, 0.8);
}

.footer .logo-placeholder {
  color: var(--color-primary-dark);
  text-shadow: none;
}

.footer-bottom {
  margin-top: 32px;
  padding-top: 16px;
  border-top: 1px solid #eee;
  color: #8a8a8a;
  font-size: 13px;
}

/* Search popups */
.ui-popup {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 40;
  background: var(--color-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

.ui-popup-title {
  display: block;
  margin-bottom: 10px;
  color: #000;
  font-size: 16px;
  font-weight: 500;
}

.airport-popup {
  width: 320px;
  padding: 14px 16px 12px;
}

.airport-popup ul {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 310px;
  overflow-y: auto;
}

.airport-popup li {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 0 8px;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid #dedede;
  cursor: pointer;
}

.airport-popup li em {
  grid-row: 1 / span 2;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f4f4f4;
  border: 1px solid #d9d9d9;
  border-radius: 9px;
  font-style: normal;
  font-size: 11px;
  color: #000;
}

.airport-popup li strong {
  display: block;
  font-weight: 400;
  font-size: 16px;
  color: #000;
}

.airport-popup li span {
  display: block;
  color: #888;
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Calendar */
.datepicker-popup {
  left: 50%;
  transform: translateX(-50%);
  width: min(560px, calc(100vw - 24px));
  padding: 14px 20px 18px;
}

.demo-calendar {
  width: 100%;
}

.demo-cal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.demo-cal-header strong {
  font-size: 14px;
  font-weight: 500;
}

.demo-cal-nav {
  width: 32px;
  height: 32px;
  border: 0;
  background: transparent;
  color: var(--color-primary);
  font-size: 18px;
}

.demo-cal-weekdays,
.demo-cal-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  text-align: center;
}

.demo-cal-weekdays span {
  color: #888;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.demo-cal-day,
.demo-cal-empty {
  width: 32px;
  height: 32px;
  margin: 0 auto;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #2f414b;
  font-size: 13px;
  font-weight: 500;
}

.demo-cal-day:hover {
  background: #f5f5f5;
  color: var(--color-primary);
}

.demo-cal-day.selected {
  background: var(--color-secondary);
  color: var(--color-white);
}

.demo-cal-day.today:not(.selected) {
  box-shadow: inset 0 0 0 1px var(--color-secondary);
}

.demo-cal-day.disabled {
  color: #9aa8b2;
  cursor: default;
}

.demo-cal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 12px;
}

.demo-cal-footer button {
  border: 0;
  background: transparent;
  color: var(--color-primary);
  font-weight: 600;
}

/* Traveller / rooms popups */
.traveller-popup,
.rooms-popup {
  width: min(420px, calc(100vw - 24px));
  padding: 16px 18px;
  right: 0;
  left: auto;
}

.traveller-popup h5,
.rooms-popup h5 {
  margin: 0 0 12px;
  font-size: 18px;
}

.traveller-popup ul,
.rooms-popup ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.traveller-popup li,
.guest-type-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid #eee;
}

.traveller-popup label,
.guest-type-card label {
  font-weight: 700;
  color: var(--color-primary);
}

.traveller-popup label span,
.guest-type-card label span {
  display: block;
  font-weight: 400;
  font-size: 12px;
  color: var(--color-muted);
}

.tc-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tc-row .count-btn {
  min-width: 32px;
  height: 32px;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  background: var(--color-white);
  color: var(--color-text);
}

.tc-row .count-btn.selected,
.tc-row .step-btn:hover {
  background: var(--color-secondary);
  border-color: var(--color-secondary);
  color: var(--color-white);
}

.tclass {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
}

.tclass select {
  flex: 1;
  padding: 8px 10px;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  background: var(--color-white);
}

.popup-error {
  margin-top: 8px;
  color: #c0392b;
  font-size: 12px;
}

.popup-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 14px;
}

.step-btn {
  width: 32px;
  height: 32px;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  background: var(--color-white);
}

.step-value {
  width: 36px;
  text-align: center;
  border: 0;
  background: transparent;
  font-weight: 600;
}

@media (max-width: 900px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 568px) {
  .header-actions .support-btn,
  .header-actions .btn-secondary {
    display: none;
  }

  .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .header.dashboardPage {
    background: transparent;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .airport-popup,
  .datepicker-popup,
  .traveller-popup,
  .rooms-popup {
    position: fixed;
    inset: 0;
    width: 100%;
    max-width: none;
    transform: none;
    border-radius: 0;
    z-index: 2100;
  }
}
