/* ============================================================
   Hotel Room Display — e-Room Style
   ============================================================
   Dark blue + gold theme, circular buttons, landscape-first.
   Matches the visual design of the Flutter e-room app but
   fully config-driven from the SDS Dashboard API.
   ============================================================ */

/* --- CSS Variables (overridden by property branding) --- */
:root {
  --gold: #D4AF7D;
  --gold-light: color-mix(in srgb, var(--gold) 75%, white);
  --gold-glow: color-mix(in srgb, var(--gold) 30%, transparent);
  --dark-blue: #12202F;
  --header-blue: #19283A;
  --bg-dark: #0d1821;
  --text-light: #DCDCDC;
  --text-muted: #8A9BB0;
  --border: rgba(255, 255, 255, 0.08);
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --bg-image: none;
}

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  font-family: 'Roboto', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--dark-blue);
  color: var(--text-light);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  cursor: default;
  user-select: none;
}

/* --- Screens --- */
.screen {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 1;
  opacity: 0;
  transition: opacity 0.35s ease;
}
.screen.active {
  display: flex;
  opacity: 1;
}

/* ============================================================
   SETUP SCREEN
   ============================================================ */
#setup-screen {
  background: linear-gradient(135deg, #0d1821, var(--dark-blue), #0d1821);
  align-items: center;
  justify-content: center;
}

.setup-container {
  width: 100%;
  max-width: 420px;
  padding: 48px 40px;
  background: var(--header-blue);
  border-radius: 16px;
  border: 1px solid var(--border);
  text-align: center;
}

.setup-logo {
  width: 72px;
  height: 72px;
  margin: 0 auto 24px;
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.setup-logo .material-symbols-outlined { font-size: 36px; color: var(--dark-blue); }

.setup-title { font-size: 24px; font-weight: 700; margin-bottom: 8px; }
.setup-subtitle { font-size: 14px; color: var(--text-muted); margin-bottom: 32px; }
.setup-form { text-align: left; }
.setup-field { margin-bottom: 18px; }
.setup-field label {
  display: block; font-size: 12px; font-weight: 500; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 6px;
}
.setup-field input,
.setup-field select {
  width: 100%; padding: 14px 16px; background: var(--bg-dark); border: 1px solid var(--border);
  border-radius: 10px; color: var(--text-light); font-size: 15px; font-family: inherit;
  transition: border var(--transition);
}
.setup-field select { cursor: pointer; appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%238A9BB0' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 16px center; padding-right: 40px;
}
.setup-field select option { background: var(--bg-dark); color: var(--text-light); }
.setup-field input:focus,
.setup-field select:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-glow); }
.setup-field input::placeholder { color: var(--text-muted); }
.setup-hint { display: block; font-size: 12px; color: var(--text-muted); margin-top: 6px; }
.setup-error { color: #f87171; font-size: 13px; text-align: center; margin-top: 12px; min-height: 18px; }

.setup-btn {
  width: 100%; padding: 16px; background: linear-gradient(135deg, var(--gold), var(--gold-light));
  border: none; border-radius: 10px; color: var(--dark-blue); font-size: 16px; font-weight: 700;
  font-family: inherit; cursor: pointer; display: flex; align-items: center; justify-content: center;
  gap: 8px; transition: all var(--transition); margin-top: 8px;
}
.setup-btn:hover { transform: translateY(-1px); box-shadow: 0 8px 24px var(--gold-glow); }
.setup-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

/* ============================================================
   PAIRING SCREEN
   ============================================================ */
#pairing-screen {
  background: linear-gradient(135deg, #0d1821, var(--dark-blue), #0d1821);
  align-items: center;
  justify-content: center;
}

.pairing-container {
  width: 100%;
  max-width: 480px;
  padding: 48px 40px;
  background: var(--header-blue);
  border-radius: 20px;
  border: 1px solid var(--border);
  text-align: center;
}

.pairing-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 24px;
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.pairing-icon .material-symbols-outlined {
  font-size: 40px;
  color: var(--dark-blue);
}

.pairing-title {
  font-size: 26px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text-light);
}

.pairing-subtitle {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 32px;
  line-height: 1.5;
}

.pairing-code {
  font-family: 'Roboto Mono', 'Courier New', monospace;
  font-size: 52px;
  font-weight: 700;
  letter-spacing: 12px;
  padding: 20px 24px;
  margin: 0 auto 24px;
  background: var(--bg-dark);
  border: 2px solid var(--gold);
  border-radius: 16px;
  color: var(--gold);
  display: inline-block;
  min-width: 300px;
  text-align: center;
  box-shadow: 0 0 40px var(--gold-glow), inset 0 0 20px rgba(0,0,0,0.3);
  animation: codePulse 2s ease-in-out infinite;
}

@keyframes codePulse {
  0%, 100% { box-shadow: 0 0 40px var(--gold-glow), inset 0 0 20px rgba(0,0,0,0.3); }
  50% { box-shadow: 0 0 60px var(--gold-glow), 0 0 80px var(--gold-glow), inset 0 0 20px rgba(0,0,0,0.3); }
}

.pairing-status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-size: 15px;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.pairing-spinner {
  width: 20px;
  height: 20px;
  border: 2.5px solid var(--border);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.pairing-status.approved {
  color: #4CAF50;
}
.pairing-status.approved .pairing-spinner {
  display: none;
}
.pairing-status.expired {
  color: #f44336;
}
.pairing-status.expired .pairing-spinner {
  display: none;
}

.pairing-hint {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 16px;
  line-height: 1.5;
}
.pairing-hint strong {
  color: var(--gold);
}

.pairing-expires {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 24px;
  opacity: 0.7;
}
.pairing-expires span {
  font-family: 'Roboto Mono', monospace;
  color: var(--text-light);
}

.pairing-cancel {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 24px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text-muted);
  font-size: 14px;
  font-family: inherit;
  cursor: pointer;
  transition: all var(--transition);
}
.pairing-cancel:hover {
  border-color: var(--gold);
  color: var(--gold);
  background: rgba(212,175,125,0.05);
}
.pairing-cancel .material-symbols-outlined {
  font-size: 18px;
}

/* ============================================================
   LOADING SCREEN
   ============================================================ */
#loading-screen {
  background: var(--dark-blue);
  align-items: center;
  justify-content: center;
}
.loading-container { text-align: center; }
.loading-spinner {
  width: 48px; height: 48px; border: 3px solid var(--border); border-top-color: var(--gold);
  border-radius: 50%; margin: 0 auto 20px; animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-text { font-size: 15px; color: var(--text-muted); }

/* ============================================================
   WELCOME SCREEN — Full screen, language selection
   ============================================================ */
#welcome-screen {
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--dark-blue);
}

.welcome-bg {
  position: absolute; inset: 0;
  background-image: var(--bg-image);
  background-size: cover; background-position: center;
  z-index: 0;
}
.welcome-overlay {
  position: absolute; inset: 0;
  background: rgba(18, 32, 47, 0.6);
  z-index: 1;
}
.welcome-content {
  position: relative; z-index: 2;
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 40px;
  width: 100%; height: 100%; padding: 40px;
}

/* Hidden staff tap zone */
.staff-tap-zone {
  position: absolute; top: 0; left: 0;
  width: 80px; height: 80px; z-index: 10;
}

/* Center content */
.welcome-center { text-align: center; }
.welcome-logo {
  height: 60px; max-width: 200px; object-fit: contain; margin-bottom: 16px;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.3));
}

.welcome-line {
  width: 120px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  margin: 0 auto 16px;
}

.welcome-subtitle {
  font-size: 20px; font-weight: 300; color: var(--text-light);
  letter-spacing: 2px; text-transform: uppercase; margin-bottom: 8px;
}

.welcome-hotel {
  font-size: 48px; font-weight: 700; color: var(--gold);
  letter-spacing: 1px; margin-bottom: 12px;
}

.welcome-diamond {
  font-size: 16px; color: var(--gold); margin-bottom: 16px;
  letter-spacing: 6px;
}

/* Guest greeting on welcome screen */
.welcome-guest-greeting {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 24px;
  margin-bottom: 12px;
  background: rgba(212, 175, 125, 0.12);
  border: 1px solid rgba(212, 175, 125, 0.3);
  border-radius: 24px;
  color: var(--gold-light);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.5px;
  animation: fadeIn 0.6s ease;
}
.welcome-guest-greeting .material-symbols-outlined {
  font-size: 18px;
  color: var(--gold);
}

/* Language flags */
.welcome-flags {
  display: flex; gap: 20px; justify-content: center;
}

.flag-btn {
  width: 80px; height: 80px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 2px solid rgba(255, 255, 255, 0.15);
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: all 0.25s ease; position: relative;
}
.flag-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--gold);
  transform: scale(1.08);
  box-shadow: 0 0 20px var(--gold-glow);
}
.flag-btn:active { transform: scale(0.95); }
.flag-btn img { pointer-events: none; }

/* ============================================================
   MENU SCREEN — Main navigation with circular buttons
   ============================================================ */
#menu-screen {
  flex-direction: column;
  background: var(--dark-blue);
}

.menu-bg {
  position: absolute; inset: 0;
  background-image: var(--bg-image);
  background-size: cover; background-position: center;
  z-index: 0;
}
.menu-overlay {
  position: absolute; inset: 0;
  background: rgba(18, 32, 47, 0.7);
  z-index: 1;
}

/* Header */
.menu-header {
  position: relative; z-index: 2;
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 32px; flex-shrink: 0;
}

.menu-home-btn {
  width: 48px; height: 48px; border-radius: 50%;
  background: white; border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s ease; box-shadow: 0 2px 12px rgba(0,0,0,0.3);
}
.menu-home-btn:hover { transform: scale(1.08); box-shadow: 0 4px 20px rgba(0,0,0,0.4); }
.menu-home-btn:active { transform: scale(0.95); }
.menu-home-btn .material-symbols-outlined { font-size: 24px; color: var(--dark-blue); }

.menu-header-center { text-align: center; display: flex; align-items: center; justify-content: center; gap: 12px; }
.menu-logo { height: 36px; max-width: 120px; object-fit: contain; filter: drop-shadow(0 1px 2px rgba(0,0,0,0.3)); }
.menu-hotel-name { font-size: 18px; font-weight: 500; color: var(--gold); letter-spacing: 1px; }
.menu-guest-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 500;
  color: var(--gold-light);
  background: rgba(212, 175, 125, 0.15);
  border: 1px solid rgba(212, 175, 125, 0.25);
  border-radius: 12px;
  padding: 2px 10px;
  margin-left: 8px;
  letter-spacing: 0.3px;
  vertical-align: middle;
}

/* Language button */
.menu-lang-btn {
  width: 48px; height: 48px; border-radius: 50%;
  background: rgba(255,255,255,0.08); border: 2px solid rgba(255,255,255,0.12);
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: all 0.25s ease; font-size: 24px;
  overflow: hidden; flex-shrink: 0;
  position: relative;
}
.menu-lang-btn::after {
  content: '';
  position: absolute; inset: -2px; border-radius: 50%;
  border: 2px solid transparent;
  transition: border-color 0.25s ease;
}
.menu-lang-btn:hover {
  background: rgba(255,255,255,0.12);
  border-color: var(--gold);
  transform: scale(1.06);
  box-shadow: 0 0 16px var(--gold-glow);
}
.menu-lang-btn:active { transform: scale(0.95); }
.menu-lang-btn img,
.menu-lang-btn .menu-lang-flag img,
.menu-lang-btn .content-lang-flag img {
  width: 30px; height: 30px; border-radius: 50%; object-fit: cover;
  display: block;
}

/* Language dropdown */
.lang-dropdown {
  position: absolute; top: 76px; right: 32px; z-index: 100;
  background: var(--header-blue); border: 1px solid var(--border);
  border-radius: 16px; padding: 6px; min-width: 220px;
  box-shadow: 0 12px 48px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,255,255,0.04);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  /* Animation handled by JS class */
  opacity: 0; transform: translateY(-8px) scale(0.96);
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.lang-dropdown.lang-dd-open {
  opacity: 1; transform: translateY(0) scale(1);
}

/* Dropdown header */
.lang-dd-header {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 14px 8px; font-size: 11px; font-weight: 600;
  color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px;
  border-bottom: 1px solid var(--border); margin-bottom: 4px;
}

/* Dropdown buttons */
.lang-dd-btn {
  display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 10px 14px; background: none; border: none; border-radius: 10px;
  color: var(--text-light); font-size: 14px; font-family: inherit;
  cursor: pointer; transition: all 0.2s ease;
  position: relative;
  opacity: 0; animation: langFadeIn 0.25s ease forwards;
}
@keyframes langFadeIn {
  from { opacity: 0; transform: translateX(-8px); }
  to { opacity: 1; transform: translateX(0); }
}
.lang-dd-btn:hover {
  background: rgba(255,255,255,0.08);
  transform: translateX(2px);
}
.lang-dd-btn.active {
  background: color-mix(in srgb, var(--gold) 10%, transparent);
}

/* Flag in dropdown */
.lang-dd-flag {
  flex-shrink: 0; width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
}
.lang-dd-flag img {
  width: 28px; height: 28px; border-radius: 50%; object-fit: cover;
  border: 2px solid rgba(255,255,255,0.1);
  transition: border-color 0.2s;
}
.lang-dd-btn:hover .lang-dd-flag img,
.lang-dd-btn.active .lang-dd-flag img {
  border-color: var(--gold);
}

/* Language info (name + code) */
.lang-dd-info {
  display: flex; flex-direction: column; gap: 1px; flex: 1; text-align: left;
}
.lang-dd-name {
  font-size: 14px; font-weight: 500; color: var(--text-light);
  line-height: 1.2;
}
.lang-dd-code {
  font-size: 11px; font-weight: 400; color: var(--text-muted);
  letter-spacing: 0.5px;
}
.lang-dd-btn.active .lang-dd-name { color: var(--gold); font-weight: 600; }
.lang-dd-btn.active .lang-dd-code { color: var(--gold); opacity: 0.7; }

/* Active checkmark */
.lang-dd-check {
  font-size: 20px; color: var(--gold); flex-shrink: 0;
  margin-left: auto;
}

/* Main menu — circular buttons row */
.menu-main {
  position: relative; z-index: 2;
  flex: 1; display: flex; align-items: center; justify-content: center;
  gap: 40px; padding: 0 40px;
  flex-wrap: wrap;
}

.menu-btn {
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  background: none; border: none; cursor: pointer; padding: 8px;
  transition: all 0.2s ease;
}
.menu-btn:hover { transform: translateY(-4px); }
.menu-btn:active { transform: scale(0.95); }

.menu-btn-circle {
  width: 100px; height: 100px; border-radius: 50%;
  background: white; display: flex; align-items: center; justify-content: center;
  transition: all 0.25s ease;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}
.menu-btn-circle .material-symbols-outlined { color: var(--dark-blue); }
.menu-btn-circle img { border-radius: 50%; }

.menu-btn:hover .menu-btn-circle {
  box-shadow: 0 4px 24px rgba(0,0,0,0.4), 0 0 0 3px var(--gold);
}
.menu-btn.active .menu-btn-circle {
  box-shadow: 0 4px 24px rgba(0,0,0,0.4), 0 0 0 3px var(--gold);
  background: var(--gold);
}
.menu-btn.active .menu-btn-circle .material-symbols-outlined { color: var(--dark-blue); }

.menu-btn-label {
  font-size: 14px; font-weight: 500; color: var(--text-light);
  text-align: center; max-width: 120px; line-height: 1.3;
}

/* Sub-menu — smaller circular buttons below */
.menu-sub {
  position: relative; z-index: 2;
  display: flex; align-items: center; justify-content: center;
  gap: 28px; padding: 20px 40px 32px;
  flex-wrap: wrap;
  animation: slideDown 0.3s ease;
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-16px); }
  to { opacity: 1; transform: translateY(0); }
}

.sub-btn {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  background: none; border: none; cursor: pointer; padding: 4px;
  transition: all 0.2s ease;
  opacity: 0; animation: fadeInUp 0.35s ease forwards;
}
.sub-btn:hover { transform: translateY(-3px); }
.sub-btn:active { transform: scale(0.93); }

.sub-btn-circle {
  width: 72px; height: 72px; border-radius: 50%;
  background: white; display: flex; align-items: center; justify-content: center;
  transition: all 0.25s ease;
  box-shadow: 0 2px 12px rgba(0,0,0,0.2);
}
.sub-btn-circle .material-symbols-outlined { color: var(--dark-blue); }

.sub-btn:hover .sub-btn-circle {
  box-shadow: 0 4px 20px rgba(0,0,0,0.3), 0 0 0 2px var(--gold);
}

.sub-btn-label {
  font-size: 12px; font-weight: 500; color: var(--text-muted);
  text-align: center; max-width: 100px; line-height: 1.2;
}

/* ============================================================
   CONTENT SCREEN
   ============================================================ */
#content-screen {
  flex-direction: column;
  background: var(--dark-blue);
}

.content-bg {
  position: absolute; inset: 0;
  background-image: var(--bg-image);
  background-size: cover; background-position: center;
  z-index: 0;
}
.content-overlay {
  position: absolute; inset: 0;
  background: rgba(18, 32, 47, 0.85);
  z-index: 1;
}

.content-header {
  position: relative; z-index: 2;
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 32px; flex-shrink: 0;
  background: var(--header-blue); border-bottom: 1px solid var(--border);
}

.content-back-btn {
  display: flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,0.08); border: 1px solid var(--border);
  border-radius: 10px; color: var(--text-light); font-size: 14px; font-weight: 500;
  font-family: inherit; padding: 10px 18px; cursor: pointer;
  transition: all 0.2s ease;
}
.content-back-btn:hover { background: rgba(255,255,255,0.12); border-color: var(--gold); }
.content-back-btn .material-symbols-outlined { font-size: 20px; }

.content-title {
  font-size: 20px; font-weight: 500; color: var(--gold); letter-spacing: 0.5px;
}

.content-body {
  position: relative; z-index: 2;
  flex: 1; padding: 24px 32px 32px;
  overflow-y: auto; overflow-x: hidden;
  scrollbar-width: thin; scrollbar-color: var(--text-muted) transparent;
}
.content-body::-webkit-scrollbar { width: 6px; }
.content-body::-webkit-scrollbar-thumb { background: var(--text-muted); border-radius: 3px; }

.content-loading { display: flex; align-items: center; justify-content: center; padding: 60px; }
.content-empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 12px; padding: 60px; text-align: center; color: var(--text-muted);
}
.content-empty .material-symbols-outlined { font-size: 56px; opacity: 0.3; }

/* ============================================================
   MENU ITEMS — restaurant content
   ============================================================ */
.menu-items-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 16px;
}

.menu-item-card {
  background: rgba(255,255,255,0.04); border: 1px solid var(--border);
  border-radius: 14px; overflow: hidden; display: flex; flex-direction: column;
  transition: all 0.25s ease;
  opacity: 0; animation: fadeInUp 0.4s ease forwards;
}
.menu-item-card:hover { border-color: rgba(255,255,255,0.12); background: rgba(255,255,255,0.06); }

.menu-item-image { height: 180px; overflow: hidden; }
.menu-item-image img { width: 100%; height: 100%; object-fit: cover; }

.menu-item-info { padding: 20px; flex: 1; display: flex; flex-direction: column; gap: 6px; }
.menu-item-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.menu-item-name { font-size: 18px; font-weight: 500; flex: 1; }
.menu-item-price { font-size: 18px; font-weight: 700; color: var(--gold); white-space: nowrap; }
.menu-item-desc { font-size: 14px; color: var(--text-muted); line-height: 1.5; }
.menu-item-cat {
  display: inline-block; padding: 3px 10px; background: color-mix(in srgb, var(--gold) 10%, transparent);
  border-radius: 20px; font-size: 11px; font-weight: 600; color: var(--gold);
  text-transform: capitalize; margin-top: 4px; align-self: flex-start;
}

/* ============================================================
   INFO PAGES
   ============================================================ */
.info-pages { display: flex; flex-direction: column; gap: 16px; }

.info-card {
  display: flex; flex-direction: row; align-items: stretch;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  border-radius: 16px; overflow: hidden;
  transition: all 0.3s cubic-bezier(.4,0,.2,1);
  opacity: 0; animation: fadeInUp 0.4s ease forwards;
}
.info-card:hover {
  background: rgba(255,255,255,0.08);
  border-color: color-mix(in srgb, var(--gold) 30%, transparent);
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.25);
}

/* Accent bar for cards without images */
.info-accent {
  width: 4px; flex-shrink: 0;
  background: linear-gradient(180deg, var(--gold), color-mix(in srgb, var(--gold) 40%, transparent));
  border-radius: 4px 0 0 4px;
}

/* Image (horizontal thumbnail) */
.info-image {
  width: 140px; min-height: 100px; flex-shrink: 0; overflow: hidden;
  position: relative;
}
.info-image::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent 60%, rgba(0,0,0,0.2));
}
.info-image img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.info-card:hover .info-image img { transform: scale(1.06); }

/* Text area */
.info-text {
  flex: 1; padding: 20px 24px; display: flex; flex-direction: column; justify-content: center;
  min-width: 0;
}
.info-title {
  font-size: 17px; font-weight: 600; color: var(--text-light);
  margin-bottom: 6px; line-height: 1.3;
}
.info-body {
  font-size: 14px; color: var(--text-muted); line-height: 1.6;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}

/* Action link indicator */
.info-action-link {
  display: inline-flex; align-items: center; gap: 4px;
  margin-top: 10px; color: var(--gold); font-size: 13px; font-weight: 500;
  opacity: 0.7; transition: opacity 0.2s, gap 0.2s;
}
.info-action-link .material-symbols-outlined { font-size: 18px; transition: transform 0.2s; }
.info-card:hover .info-action-link { opacity: 1; }
.info-card:hover .info-action-link .material-symbols-outlined { transform: translateX(3px); }

/* Grid layout override */
.info-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px;
}
.info-grid .info-card { flex-direction: column; }
.info-grid .info-image { width: 100%; height: 160px; }
.info-grid .info-accent { width: 100%; height: 3px; border-radius: 3px 3px 0 0; }

/* Small screens: stack vertically */
@media (max-width: 480px) {
  .info-card.has-image { flex-direction: column; }
  .info-card.has-image .info-image { width: 100%; height: 160px; }
}

/* ============================================================
   AMENITIES
   ============================================================ */
.amenity-list { display: flex; flex-direction: column; gap: 16px; }

.amenity-card {
  background: rgba(255,255,255,0.04); border: 1px solid var(--border);
  border-radius: 14px; padding: 24px; display: flex; gap: 20px; align-items: flex-start;
  transition: all 0.25s ease;
  opacity: 0; animation: fadeInUp 0.4s ease forwards;
}
.amenity-card:hover { border-color: rgba(255,255,255,0.12); }

.amenity-image { width: 120px; height: 90px; border-radius: 10px; overflow: hidden; flex-shrink: 0; }
.amenity-image img { width: 100%; height: 100%; object-fit: cover; }

.amenity-info { flex: 1; }
.amenity-name { font-size: 18px; font-weight: 500; margin-bottom: 6px; }
.amenity-desc { font-size: 14px; color: var(--text-muted); line-height: 1.5; margin-bottom: 10px; }
.amenity-meta { display: flex; gap: 16px; flex-wrap: wrap; }
.amenity-badge {
  display: flex; align-items: center; gap: 6px;
  padding: 4px 12px; background: color-mix(in srgb, var(--gold) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--gold) 15%, transparent); border-radius: 20px;
  font-size: 13px; color: var(--gold);
}
.amenity-badge .material-symbols-outlined { font-size: 16px; }

/* ============================================================
   ANNOUNCEMENTS
   ============================================================ */
.announce-list { display: flex; flex-direction: column; gap: 16px; }

.announce-card {
  background: rgba(255,255,255,0.04); border: 1px solid var(--border);
  border-radius: 14px; padding: 24px;
  transition: all 0.25s ease;
  opacity: 0; animation: fadeInUp 0.4s ease forwards;
}
.announce-card:hover { border-color: rgba(255,255,255,0.12); }

.announce-priority {
  display: inline-block; padding: 3px 10px; border-radius: 20px;
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  margin-bottom: 12px; letter-spacing: 0.5px;
}
.priority-low .announce-priority { background: rgba(100,200,100,0.15); color: #6edd6e; }
.priority-normal .announce-priority { background: rgba(100,170,255,0.15); color: #6aafff; }
.priority-high .announce-priority { background: rgba(255,100,100,0.15); color: #ff6a6a; }

.announce-image { height: 180px; border-radius: 10px; overflow: hidden; margin-bottom: 16px; }
.announce-image img { width: 100%; height: 100%; object-fit: cover; }

.announce-title { font-size: 20px; font-weight: 500; margin-bottom: 8px; }
.announce-body { font-size: 15px; color: var(--text-muted); line-height: 1.6; }

/* ============================================================
   GENERIC CONTENT
   ============================================================ */
.generic-list { display: flex; flex-direction: column; gap: 16px; }
.generic-card {
  background: rgba(255,255,255,0.04); border: 1px solid var(--border);
  border-radius: 14px; padding: 24px;
  opacity: 0; animation: fadeInUp 0.4s ease forwards;
}
.generic-field { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--border); align-items: center; gap: 16px; }
.generic-field:last-child { border-bottom: none; }
.generic-field-block { flex-direction: column; align-items: flex-start; gap: 6px; }
.generic-label { font-size: 13px; color: var(--text-muted); font-weight: 500; flex-shrink: 0; }
.generic-value { font-size: 15px; text-align: right; }
.generic-field-block .generic-value { text-align: left; width: 100%; }
.generic-img { width: 100%; max-height: 200px; object-fit: cover; border-radius: 10px; margin-bottom: 12px; }
.generic-raw { font-size: 12px; color: var(--text-muted); white-space: pre-wrap; }

/* Richtext content */
.generic-richtext { font-size: 15px; color: var(--text-muted); line-height: 1.7; }
.generic-richtext h1, .generic-richtext h2, .generic-richtext h3 { color: var(--text-light); margin: 12px 0 8px; }
.generic-richtext p { margin: 4px 0; }
.generic-richtext a { color: var(--gold); text-decoration: underline; }
.generic-richtext ul, .generic-richtext ol { padding-left: 20px; margin: 8px 0; }

/* URL links */
.generic-link {
  color: var(--gold); text-decoration: none; font-size: 14px;
  word-break: break-all; transition: opacity 0.2s;
}
.generic-link:hover { text-decoration: underline; opacity: 0.8; }

/* Toggle indicators */
.generic-toggle { display: flex; align-items: center; gap: 6px; }
.generic-toggle.on { color: #6edd6e; }
.generic-toggle.off { color: var(--text-muted); opacity: 0.5; }

/* Tags pills */
.generic-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.generic-tag {
  display: inline-block; padding: 3px 12px;
  background: color-mix(in srgb, var(--gold) 10%, transparent); border: 1px solid color-mix(in srgb, var(--gold) 15%, transparent);
  border-radius: 20px; font-size: 12px; font-weight: 500; color: var(--gold);
}

/* ============================================================
   PDF VIEWER OVERLAY
   ============================================================ */
.pdf-overlay {
  position: fixed; inset: 0; z-index: 1000;
  background: #404040; display: flex; align-items: center; justify-content: center;
}
.pdf-frame { width: 100%; height: 100%; border: none; }
.pdf-close-btn {
  position: absolute; top: 16px; right: 16px; z-index: 1001;
  width: 48px; height: 48px; border-radius: 50%;
  background: white; border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 16px rgba(0,0,0,0.4);
  transition: all 0.2s ease;
}
.pdf-close-btn:hover { transform: scale(1.08); }
.pdf-close-btn .material-symbols-outlined { font-size: 24px; color: #333; }

/* ============================================================
   WEBSITE IFRAME OVERLAY (sandboxed)
   ============================================================ */
.web-overlay {
  position: fixed; inset: 0; z-index: 900;
  background: var(--dark-blue);
  display: flex; flex-direction: column;
  animation: fadeIn 0.25s ease;
}
.web-overlay-enter {
  opacity: 0;
  transform: translateY(20px);
}
.web-overlay-exit {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.web-overlay-bar {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 16px;
  background: var(--header-blue);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  z-index: 1;
}

.web-overlay-back,
.web-overlay-close {
  width: 40px; height: 40px; border-radius: 50%;
  border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.web-overlay-back {
  background: rgba(255,255,255,0.08);
  color: var(--text-light);
}
.web-overlay-back:hover {
  background: rgba(255,255,255,0.15);
}
.web-overlay-back .material-symbols-outlined {
  font-size: 22px;
  color: var(--text-light);
}

.web-overlay-close {
  background: white;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
.web-overlay-close:hover {
  transform: scale(1.08);
}
.web-overlay-close .material-symbols-outlined {
  font-size: 22px;
  color: #333;
}

.web-overlay-url {
  flex: 1;
  font-size: 13px;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: center;
  padding: 8px 16px;
  background: var(--bg-dark);
  border-radius: 20px;
  border: 1px solid var(--border);
  font-family: 'Roboto Mono', monospace;
  letter-spacing: 0.3px;
}

.web-frame {
  flex: 1;
  width: 100%;
  border: none;
  background: white;
}

/* ============================================================
   STAFF PIN DIALOG
   ============================================================ */
.pin-dialog {
  position: fixed; inset: 0; z-index: 2000;
  background: rgba(0,0,0,0.6); display: flex; align-items: center; justify-content: center;
}
.pin-box {
  background: var(--header-blue); border: 1px solid var(--border);
  border-radius: 14px; padding: 32px; min-width: 300px; text-align: center;
}
.pin-box h3 { font-size: 18px; margin-bottom: 20px; color: var(--gold); }
.pin-box input {
  width: 100%; padding: 14px; background: var(--bg-dark); border: 1px solid var(--border);
  border-radius: 10px; color: var(--text-light); font-size: 24px; text-align: center;
  font-family: inherit; letter-spacing: 8px; margin-bottom: 20px;
}
.pin-box input:focus { outline: none; border-color: var(--gold); }
.pin-actions { display: flex; gap: 12px; }
.pin-btn {
  flex: 1; padding: 12px; border: 1px solid var(--border); border-radius: 10px;
  background: none; color: var(--text-light); font-size: 14px; font-weight: 500;
  font-family: inherit; cursor: pointer; transition: all 0.2s ease;
}
.pin-btn:hover { border-color: var(--text-muted); }
.pin-btn-primary { background: var(--gold); border-color: var(--gold); color: var(--dark-blue); font-weight: 700; }
.pin-btn-primary:hover { opacity: 0.9; }

/* ============================================================
   MESSAGE OVERLAY (replaces alert)
   ============================================================ */
.message-overlay {
  position: fixed; inset: 0; z-index: 1500;
  background: rgba(0, 0, 0, 0.6);
  display: flex; align-items: center; justify-content: center;
  animation: fadeIn 0.2s ease;
}
.message-box {
  background: var(--header-blue); border: 1px solid var(--border);
  border-radius: 16px; padding: 32px 40px; max-width: 480px; width: 90%;
  text-align: center; position: relative;
}
.message-text {
  font-size: 18px; color: var(--text-light); line-height: 1.6;
}
.message-close-btn {
  position: absolute; top: 12px; right: 12px;
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(255,255,255,0.08); border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.2s;
}
.message-close-btn:hover { background: rgba(255,255,255,0.15); }
.message-close-btn .material-symbols-outlined { font-size: 20px; color: var(--text-light); }

/* ============================================================
   PER-ENTRY ACTION HINTS & ACTIONABLE CARDS
   ============================================================ */
.actionable { cursor: pointer; position: relative; }
.actionable:hover { border-color: var(--gold) !important; }
.entry-action-hint {
  position: absolute; top: 12px; right: 12px;
  font-size: 20px !important; color: var(--gold); opacity: 0.5;
  transition: opacity 0.2s;
}
.actionable:hover .entry-action-hint { opacity: 1; }

/* ============================================================
   LAYOUT VARIANTS (grid mode for list-style content)
   ============================================================ */
.menu-items-list { display: flex; flex-direction: column; gap: 12px; }
.menu-items-list .menu-item-card { flex-direction: row; }
.menu-items-list .menu-item-image { width: 120px; height: auto; min-height: 80px; }

.amenity-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.amenity-grid .amenity-card { flex-direction: column; }
.amenity-grid .amenity-image { width: 100%; height: 140px; }

.announce-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }

.generic-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.generic-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
.generic-cards .generic-card { text-align: center; }

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ============================================================
   RESPONSIVE — Landscape TV, Tablet, Mobile
   ============================================================ */

/* Large TV / Desktop */
@media (min-width: 1280px) {
  .welcome-hotel { font-size: 56px; }
  .flag-btn { width: 100px; height: 100px; }
  .flag-btn img { width: 52px; height: 52px; }
  .menu-btn-circle { width: 120px; height: 120px; }
  .menu-btn-circle .material-symbols-outlined { font-size: 44px; }
  .menu-btn-label { font-size: 16px; }
  .menu-main { gap: 52px; }
  .sub-btn-circle { width: 84px; height: 84px; }
  .sub-btn-circle .material-symbols-outlined { font-size: 32px; }
}

/* Tablet / smaller screens */
@media (max-width: 768px) {
  .welcome-hotel { font-size: 32px; }
  .welcome-subtitle { font-size: 16px; }
  .welcome-flags { gap: 14px; }
  .flag-btn { width: 64px; height: 64px; }
  .flag-btn img { width: 32px; height: 32px; }

  .menu-main { gap: 24px; padding: 0 20px; }
  .menu-btn-circle { width: 76px; height: 76px; }
  .menu-btn-circle .material-symbols-outlined { font-size: 28px; }
  .menu-btn-label { font-size: 12px; }

  .menu-sub { gap: 16px; padding: 16px 20px; }
  .sub-btn-circle { width: 56px; height: 56px; }
  .sub-btn-circle .material-symbols-outlined { font-size: 22px; }
  .sub-btn-label { font-size: 11px; }

  .menu-header, .content-header { padding: 12px 16px; }
  .content-body { padding: 16px; }

  .menu-items-grid { grid-template-columns: 1fr; }
}

/* Short landscape screens (TV aspect ratio) */
@media (max-height: 600px) {
  .welcome-hotel { font-size: 36px; }
  .welcome-subtitle { font-size: 14px; }
  .welcome-center { gap: 4px; }
  .welcome-content { gap: 20px; padding: 16px; }
  .welcome-line { margin-bottom: 8px; }
  .flag-btn { width: 60px; height: 60px; }
  .flag-btn img { width: 30px; height: 30px; }

  .menu-main { gap: 28px; }
  .menu-btn-circle { width: 80px; height: 80px; }
  .menu-btn-circle .material-symbols-outlined { font-size: 30px; }
  .menu-btn-label { font-size: 12px; }

  .menu-sub { gap: 20px; padding: 8px 32px 16px; }
  .sub-btn-circle { width: 56px; height: 56px; }
}

/* ============================================================
   Welcome carousel image
   ============================================================ */

.welcome-carousel-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.8s ease;
  z-index: 0;
}

/* ============================================================
   Node-level dynamic backgrounds (injected by JS)
   ============================================================ */

.node-bg-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  pointer-events: none;
}

.node-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1;
  pointer-events: none;
}

/* Content header image (decorative) */
#content-header-image {
  display: none;
  height: 36px;
  max-width: 160px;
  object-fit: contain;
  margin-left: 12px;
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.4));
}

/* ============================================================
   GUEST WELCOME OVERLAY (check-in message)
   ============================================================ */
.guest-welcome-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(12px);
  animation: fadeIn 0.5s ease;
}

.guest-welcome-card {
  text-align: center;
  max-width: 480px;
  width: 90%;
  padding: 48px 40px;
  background: linear-gradient(145deg, var(--header-blue), var(--dark-blue));
  border: 1px solid var(--gold);
  border-radius: 24px;
  box-shadow: 0 0 60px var(--gold-glow), 0 24px 48px rgba(0,0,0,0.4);
  animation: scaleIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.8); }
  to { opacity: 1; transform: scale(1); }
}

.guest-welcome-icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 24px;
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.guest-welcome-icon .material-symbols-outlined {
  font-size: 36px;
  color: var(--dark-blue);
}

.guest-welcome-title {
  font-size: 28px;
  font-weight: 700;
  color: var(--gold);
  margin-bottom: 12px;
}

.guest-welcome-message {
  font-size: 16px;
  color: var(--text-light);
  line-height: 1.6;
  margin-bottom: 32px;
  white-space: pre-line;
}

.guest-welcome-dismiss {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  background: var(--gold);
  color: var(--dark-blue);
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s ease;
}
.guest-welcome-dismiss:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px var(--gold-glow);
}
.guest-welcome-dismiss .material-symbols-outlined {
  font-size: 20px;
}

/* ============================================================
   CHAT OVERLAY
   ============================================================ */

.chat-overlay {
  position: fixed;
  inset: 0;
  z-index: 3000;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  animation: chatFadeIn 0.3s ease;
}

.chat-overlay.enter {
  animation: chatFadeIn 0.3s ease;
}

@keyframes chatFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.chat-overlay-panel {
  width: 90%;
  max-width: 440px;
  height: 80%;
  max-height: 600px;
  background: #1a1a2e;
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
  animation: chatSlideUp 0.35s ease;
}

@keyframes chatSlideUp {
  from { transform: translateY(30px); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}

.chat-overlay-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 20px;
  background: rgba(255, 255, 255, 0.05);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.chat-overlay-header .material-symbols-outlined {
  font-size: 22px;
  color: var(--accent, #c5a55a);
}

.chat-overlay-title {
  flex: 1;
  font-size: 16px;
  font-weight: 600;
  color: white;
  letter-spacing: 0.3px;
}

.chat-overlay-close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.1);
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}

.chat-overlay-close:hover {
  background: rgba(255, 255, 255, 0.2);
}

.chat-overlay-close .material-symbols-outlined {
  font-size: 18px;
  color: white;
}

/* Messages area */
.chat-overlay-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.chat-empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: rgba(255, 255, 255, 0.4);
}

.chat-empty .material-symbols-outlined {
  font-size: 40px;
}

.chat-empty p {
  font-size: 14px;
}

/* Bubbles */
.chat-bubble {
  max-width: 80%;
  padding: 10px 14px;
  border-radius: 16px;
  font-size: 14px;
  line-height: 1.5;
  position: relative;
  word-wrap: break-word;
}

.chat-bubble p {
  margin: 0;
}

.chat-out {
  align-self: flex-end;
  background: var(--accent, #c5a55a);
  color: #1a1a2e;
  border-bottom-right-radius: 4px;
}

.chat-in {
  align-self: flex-start;
  background: rgba(255, 255, 255, 0.1);
  color: white;
  border-bottom-left-radius: 4px;
}

.chat-time {
  font-size: 10px;
  opacity: 0.5;
  display: block;
  margin-top: 4px;
  text-align: right;
}

/* Input bar */
.chat-overlay-input {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.05);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

#chat-input {
  flex: 1;
  padding: 10px 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.06);
  color: white;
  font-size: 14px;
  outline: none;
  transition: border-color 0.15s;
}

#chat-input::placeholder {
  color: rgba(255, 255, 255, 0.3);
}

#chat-input:focus {
  border-color: var(--accent, #c5a55a);
}

.chat-send {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: var(--accent, #c5a55a);
  color: #1a1a2e;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.1s, background 0.15s;
  flex-shrink: 0;
}

.chat-send:hover {
  transform: scale(1.08);
}

.chat-send .material-symbols-outlined {
  font-size: 20px;
}
