/* reset & base */
html,
body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100vh;
  overflow-x: hidden;
  overflow-y: auto;
  background: #000;
  font-family: "Inter", sans-serif;
  color: #fff;
  box-sizing: border-box;
}

.mobile-bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1100;
  display: none;
  align-items: center;
  justify-content: space-between;
  padding: 12px clamp(18px, 6vw, 32px);
  gap: clamp(10px, 3vw, 24px);
  background: rgba(5, 5, 5, 0.94);
  backdrop-filter: blur(18px);
  border-top: 3px solid rgba(255, 255, 255, 0.95);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 -6px 18px rgba(0, 0, 0, 0.55);
}

.mobile-nav-btn {
  flex: 1 1 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: clamp(48px, 14vw, 60px);
  height: clamp(58px, 16vw, 72px); /* extra vertical space for label */
  margin: 0 auto;
  border: none;
  border-radius: 20px;
  background: transparent;
  color: rgba(255, 255, 255, 0.72);
  transition: background 0.25s ease, color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
  cursor: pointer;
  position: relative;
  flex-direction: column;
  gap: 4px;
}

.mobile-nav-btn:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.35);
  outline-offset: 3px;
}

.mobile-nav-btn--active {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  transform: translateY(-3px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.35);
  border: 2px solid rgba(255,255,255,0.55);
}

.mobile-nav-btn .nav-icon-img {
  width: 22px;
  height: 22px;
  object-fit: contain;
  filter: brightness(0) invert(1);
  transition: filter 0.25s ease;
  pointer-events: none;
}

.mobile-nav-btn--active .nav-icon-img {
  filter: brightness(1.25);
}

.mobile-nav-btn .nav-icon {
  font-size: 26px;
  line-height: 1;
  pointer-events: none;
}

/* Make nav labels visible under icons */
.mobile-nav-btn .nav-label {
  position: static;
  width: auto;
  height: auto;
  padding: 0;
  margin: 0;
  overflow: visible;
  clip: auto;
  white-space: nowrap;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .25px;
  opacity: .78;
  line-height: 1;
  text-transform: none;
}
.mobile-nav-btn--active .nav-label {opacity:1;}

@media (max-width:480px){
  .mobile-nav-btn .nav-icon-img {width:20px; height:20px;}
  .mobile-nav-btn .nav-label {font-size:9px;}
  .embassy-guidance-alert {max-width: min(280px, 92vw); padding: 14px 16px; gap: 10px;}
  .embassy-guidance-alert__body {font-size: 12px;}
  .embassy-guidance-alert__title {font-size: 12px;}
}

.embassy-guidance-alert {
  position: fixed;
  top: calc(env(safe-area-inset-top, 0px) + var(--navq-header-height, 70px) + clamp(12px, 3vw, 20px));
  left: 50%;
  z-index: 1600;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  max-width: min(340px, 82vw);
  padding: 16px 18px;
  border-radius: 18px;
  background: rgba(12, 15, 24, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.35);
  opacity: 0;
  transform: translate(-50%, -12px);
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.embassy-guidance-alert--visible {
  opacity: 1;
  transform: translate(-50%, 0);
  pointer-events: auto;
}

.embassy-guidance-alert__icon {
  font-size: 22px;
  line-height: 1;
}

.embassy-guidance-alert__body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  line-height: 1.4;
}

.embassy-guidance-alert__title {
  font-weight: 600;
  letter-spacing: 0.3px;
  font-size: 13px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.92);
}

.embassy-guidance-alert__message {
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
}

.embassy-guidance-alert__close {
  margin-left: auto;
  margin-right: -6px;
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.7);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 999px;
  transition: background 0.2s ease, color 0.2s ease;
}

.embassy-guidance-alert__close:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.45);
  outline-offset: 2px;
}

.embassy-guidance-alert__close:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

body.embassy-alert-visible #embassyControls label,
body.embassy-alert-visible #embassyControls select,
body.embassy-alert-visible #embassyControls .actions {
  display: none;
}

.mobile-fab-group {
  position: fixed;
  right: clamp(18px, 6vw, 32px);
  bottom: 36px;
  z-index: 1101;
  display: flex;
  align-items: center;
  gap: 12px;
  pointer-events: auto;
  transition: right 0.35s ease;
}

.mobile-fab-group ~ #chatbot-toggler {
  display: none !important;
}

/* FAB items with labels */
.fab-item {display:flex; flex-direction:column; align-items:center; gap:6px; font-family:'Inter',sans-serif;}
.fab-item .fab-label {font-size:11px; letter-spacing:.3px; font-weight:500; color:#fff; text-shadow:0 1px 2px rgba(0,0,0,0.6);}

.mobile-fab-btn {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: 1px solid rgb(255, 255, 255);
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  color: #10131d;
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.35);
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease, filter 0.25s ease;
}

.mobile-fab-btn svg {
  width: 26px;
  height: 26px;
  display: block;
}

.mobile-fab-btn img {
  width: 26px;
  height: 26px;
  object-fit: contain;
  filter: none;
}

.mobile-fab-btn:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 32px rgba(0, 0, 0, 0.4);
}

.mobile-fab-btn:active {
  transform: translateY(1px);
}

.mobile-fab-btn:focus-visible {
  outline: 2px solid rgba(76, 118, 255, 0.4);
  outline-offset: 4px;
}

.mobile-fab-btn.mobile-post-btn,
.mobile-fab-btn.mobile-chatbot-btn {
  background: #fff;
  color: #000000;
}

.mobile-fab-btn.mobile-chatbot-btn[disabled] {
  cursor: default;
  pointer-events: none;
  opacity: 0.6;
  transform: none !important;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.25);
}

.mobile-post-btn--active {
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.45);
}

.mobile-chatbot-btn--active {
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.45);
}

@media (max-width:768px){
  .mobile-fab-group {gap:16px; bottom:112px;}
  .fab-item .fab-label {font-size:10px;}
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

/* Shared lightweight modal styles (used by post composer) */
.modal { position: fixed; inset: 0; display: none; align-items: center; justify-content: center; background: rgba(0,0,0,.55); z-index: 2000; }
.modal.show { display: flex; }
.modal .modal-content { width: min(960px, 96vw); height: min(82vh, 1000px); background: #0b0b0b; border: 1px solid rgba(255,255,255,.14); border-radius: 12px; position: relative; box-shadow: 0 12px 48px rgba(0,0,0,.6); overflow: hidden; }
.modal .modal-content iframe { width: 100%; height: 100%; border: 0; display: block; }
/* Post composer is a framed card */
#postComposerModal .modal-content { background: transparent; border: none; box-shadow: none; width: auto; height: auto; padding: 0; }
#postComposerModal .modal-content iframe { display: block; width: min(540px, 92vw); height: min(520px, 90vh); max-width: none; max-height: none; border: 0; border-radius: 22px; overflow: hidden; }
.modal-fallback { position:absolute; inset:0; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:12px; background:rgba(0,0,0,.25); border-radius:22px; }
.modal-fallback[aria-hidden="true"]{ display:none; }
.fallback-spinner { width:26px; height:26px; border:3px solid rgba(255,255,255,.25); border-top-color:#fff; border-radius:50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.fallback-text { font-size:13px; color:rgba(255,255,255,.85); }
.fallback-login { display:none; padding:8px 14px; border-radius:10px; border:1px solid rgba(255,255,255,.25); background:rgba(255,255,255,.08); color:#fff; cursor:pointer; }

:root {
  --navq-header-height: 70px;
  --navq-mobile-bottom-nav-height: 96px;
  --sidebar-width: 0px;
}

@media (max-width: 768px) {
  :root {
    --navq-header-height: 60px;
  }
}

/* ───── HEADER STYLES ─────────────────────────────────────────────────── */

.main-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--navq-header-height, 70px);
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 3px solid rgba(255, 255, 255, 0.959);
  z-index: 1000;
  display: flex;
  align-items: center;
  box-sizing: border-box;
  transition: margin-right 0.5s ease, border-bottom 0.3s ease;
  overflow: visible;
}

body.show-sidebar .main-header::after {
  content: '';
  position: absolute;
  bottom: -3px;
  right: calc(-1 * var(--sidebar-width, 0px));
  width: var(--sidebar-width, 0px);
  height: 3px;
  background: rgba(255, 255, 255, 0.959);
}

body.show-sidebar .main-header::before {
  content: '';
  position: absolute;
  top: 0;
  right: calc(-1 * var(--sidebar-width, 0px));
  width: var(--sidebar-width, 0px);
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: inherit;
}

.header-content {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 0 20px;
  gap: 20px;
  justify-content: space-between;
  position: relative;
  box-sizing: border-box;
  min-width: 0;
}

/* Profile Picture */
.profile-pic {
  flex-shrink: 0;
  order: 1;
}

.profile-placeholder {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid rgb(255, 255, 255);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
}

.profile-placeholder:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.3);
}

.profile-placeholder--active {
  border-color: rgba(61, 114, 255, 0.85);
  box-shadow: 0 0 0 3px rgba(61, 114, 255, 0.25);
}

.profile-placeholder span {
  font-size: 20px;
  color: rgba(255, 255, 255, 0.8);
}

/* Search Container */
.search-container {
  flex: 0 1 400px;
  position: relative;
  max-width: 400px;
  order: 2;
  margin-left: 0;
  min-width: 0;
  overflow: visible;
}

.search-container input {
  width: 100%;
  padding: 8px 12px;
  border: 2px solid rgba(255, 255, 255, 0.979);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 13px;
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
  box-sizing: border-box;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-container input::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

.search-container input:focus {
  outline: none;
  border-color: #79756A;
  background: rgba(255, 255, 255, 0.15);
  box-shadow: 0 0 0 3px rgba(121, 117, 106, 0.2);
}

/* Hamburger Menu Button */
/* Reset for reusable header toggle */
.hamburger-btn {
  width: 30px;
  height: 30px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 1001;
  flex-shrink: 0;
  order: 3;
  margin-left: auto;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hamburger-btn .hamburger-icon {
  font-size: 20px;
  color: #fff;
  opacity: 1;
  visibility: visible;
  transition: all 0.3s ease;
}

.hamburger-btn .close-icon {
  font-size: 18px;
  color: #fff;
  opacity: 0;
  visibility: hidden;
  position: absolute;
  transition: all 0.3s ease;
}

.hamburger-btn:hover .hamburger-icon,
.hamburger-btn:hover .close-icon {
  color: #79756A;
}

/* When sidebar is open, show close icon and move button */
body.show-sidebar .hamburger-btn .hamburger-icon {
  opacity: 0;
  visibility: hidden;
}

body.show-sidebar .hamburger-btn .close-icon {
  opacity: 1;
  visibility: visible;
}

/* ───── SIDEBAR STYLES ─────────────────────────────────────────────────── */

.sidebar-menu {
  position: fixed;
  top: var(--navq-header-height, 70px);
  right: 0;
  width: 0;
  height: calc(100vh - var(--navq-header-height, 70px));
  height: calc(100dvh - var(--navq-header-height, 70px));
  background: rgba(0, 0, 0, 0.95);
  backdrop-filter: blur(20px);
  border-left: 0;
  z-index: 1002;
  transition: width 0.5s ease, border-left 0.35s ease;
  overflow-x: hidden;
  overflow-y: auto;
  box-sizing: border-box;
  padding: 24px 0 32px;
  /* Ensure initial state */
  margin-right: 0;
}

body.show-sidebar .sidebar-menu {
  border-left: 3px solid rgba(255, 255, 255, 0.959);
  border-bottom: 3px solid rgba(255, 255, 255, 0.959);
}

/* Sidebar internal layout (mobile + desktop) */
#sidebar-menu.sidebar-menu {display:flex; flex-direction:column;}
.sidebar-top {flex:1 1 auto; overflow-y:auto;}
.sidebar-actions {flex:0 0 auto; display:flex; flex-direction:column; gap:18px; padding:32px 24px 24px;}
.sidebar-actions .sidebar-login-btn {width:100%;}
.sidebar-login-btn.emergency-action {background:linear-gradient(135deg,#e01212 0%,#e01212 100%);} 

.sidebar-footer-links {width:100%; padding-top:4px;}
.sidebar-footer-links ul {margin:12px 0 0; padding:0; list-style:none; display:flex; flex-wrap:wrap; justify-content:center; gap:8px 14px;}
.sidebar-footer-links li {display:flex; align-items:center; font-size:12px; font-weight:500; color:rgba(255,255,255,0.7); position:relative; letter-spacing:0.2px;}
.sidebar-footer-links li::after {content:"•"; margin-left:12px; color:rgba(255,255,255,0.32); font-weight:600;}
.sidebar-footer-links li:last-child::after {content:""; margin:0;}
.sidebar-footer-links a {color:inherit; text-decoration:none; transition:color 0.2s ease, text-decoration 0.2s ease;}
.sidebar-footer-links a.active {color:#fff; text-decoration:underline; font-weight:600;}
.sidebar-footer-links a:hover,
.sidebar-footer-links a:focus-visible {color:#fff; text-decoration:underline;}

@media (max-width:768px){
  .sidebar-actions {padding:28px 16px 12px; gap:14px;}
  .sidebar-footer-links ul {justify-content:flex-start; gap:6px 12px;}
  .sidebar-footer-links li {font-size:11px;}
  #sidebar-menu.sidebar-menu {
    height: calc(100vh - var(--navq-header-height, 70px) - var(--navq-mobile-bottom-nav-height, 96px));
    height: calc(100dvh - var(--navq-header-height, 70px) - var(--navq-mobile-bottom-nav-height, 96px));
  }
}

@media (max-width: 768px) {
  .sidebar-menu { width: 0; }
  body.show-sidebar #sidebar-menu { width:200px !important; }
  }

  /* Sidebar Navigation */
.sidebar-nav {
  padding: 20px 20px 0 20px;
  margin-top: 20px;
}

.sidebar-nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar-nav li {
  margin-bottom: 10px;
}

.sidebar-nav .sidebar-desktop-only {
  display: none;
}

@media (min-width: 769px) {
  .sidebar-nav .sidebar-desktop-only {
    display: block;
  }
}

.sidebar-btn {
  width: 100%;
  padding: 12px 16px;
  border: none;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 14px;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Ensure consistent typography for all sidebar button labels */
.sidebar-btn .sidebar-text {
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: 0;
}

/* Make sure Camera label adopts the same baseline */
#camera-span { font: inherit; letter-spacing: 0; }

.sidebar-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  filter: brightness(0) invert(1);
  transition: all 0.2s ease;
  display: inline-block;
  vertical-align: middle;
}

.sidebar-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateX(5px);
}

.sidebar-btn.flight {
  border-left: 4px solid #fff;
}

.sidebar-btn.embassy {
  border-left: 4px solid #fff;

}

.sidebar-btn.camera {
  border-left: 4px solid #fff;
}

.sidebar-btn.emergency {
  border-left: 4px solid #fff;
}

/* Risk button base style to match others */
.sidebar-btn.risk {
  border-left: 4px solid #fff;
}

/* The Code button base style (match others) */
.sidebar-btn.thecode {
  border-left: 4px solid #fff;
}

/* Home button baseline (matches others) */
.sidebar-btn.home {
  border-left: 4px solid #fff;
}

/* Hide sidebar Home on mobile (bottom bar already has Home) */
@media (max-width: 768px) {
  #sidebarHomeBtn {
    display: none !important;
  }
}

/* User Search button base style (match others) */
.sidebar-btn.user-search {
  border-left: 4px solid #fff;
}

/* User Feed button base style (match others) */
.sidebar-btn.user-feed {
  border-left: 4px solid #fff;
}


.sidebar-btn.flight.active {
  background: rgba(121, 117, 106, 0.3) !important;
  border-left-color: #79756A !important;
  color: #fff !important;
}

.sidebar-btn.embassy.active {
  background: rgba(94, 91, 82, 0.3) !important;
  border-left-color: #5e5b52 !important;
  color: #fff !important;
}

.sidebar-btn.camera.active {
  background: rgba(121, 117, 106, 0.3) !important;
  border-left-color: #79756A !important;
  color: #fff !important;
}

/* Risk button active state to match others */
.sidebar-btn.risk.active {
  background: rgba(121, 117, 106, 0.3) !important;
  border-left-color: #79756A !important;
  color: #fff !important;
}

/* The Code button active state */
.sidebar-btn.thecode.active {
  background: rgba(121, 117, 106, 0.3) !important;
  border-left-color: #79756A !important;
  color: #fff !important;
}

/* User Search button active state */
.sidebar-btn.user-search.active {
  background: rgba(121, 117, 106, 0.3) !important;
  border-left-color: #79756A !important;
  color: #fff !important;
}

/* User Feed button active state */
.sidebar-btn.user-feed.active {
  background: rgba(121, 117, 106, 0.3) !important;
  border-left-color: #79756A !important;
  color: #fff !important;
}



/* Ensure these rules override any other active states */
.sidebar-nav .sidebar-btn.flight.active {
  background: rgba(121, 117, 106, 0.3) !important;
  border-left-color: #79756A !important;
  color: #fff !important;
}

.sidebar-nav .sidebar-btn.embassy.active {
  background: rgba(94, 91, 82, 0.3) !important;
  border-left-color: #5e5b52 !important;
  color: #fff !important;
}

/* Additional specificity for flight button */
#flightModeToggle.active {
  background: rgba(121, 117, 106, 0.3) !important;
  border-left-color: #79756A !important;
  color: #fff !important;
}

/* Keep country panel pinned to left even when sidebar is open */
body.show-sidebar #countryInfoPanel {
  left: 20px !important;
}

#embassyModeToggle.active {
  background: rgba(94, 91, 82, 0.3) !important;
  border-left-color: #5e5b52 !important;
  color: #fff !important;
}

/* Icon styles for active states */
#flightModeToggle.active .sidebar-icon {
  filter: brightness(0) invert(1) !important;
}

#embassyModeToggle.active .sidebar-icon {
  filter: brightness(0) invert(1) !important;
}

/* Sidebar Country List */
.sidebar-country-list {
  padding: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-country-list h3 {
  margin: 0 0 15px 0;
  font-size: 16px;
  font-weight: 600;
  color: #fff;
}

.sidebar-country-list ul {
  list-style: none;
  padding: 0;
  margin: 0;
  max-height: 300px;
  overflow-y: auto;
}

.sidebar-country-list li {
  padding: 8px 12px;
  margin-bottom: 4px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s ease;
  font-size: 14px;
}

.sidebar-country-list li:hover {
  background: rgba(255, 255, 255, 0.1);
}

.sidebar-country-list li.selected {
  background: rgba(121, 117, 106, 0.3);
  font-weight: 500;
}

/* Sidebar Overlay - Remove since we're pushing content instead */
.sidebar-overlay {
  display: none;
}

/* ───── GLOBE STYLES ─────────────────────────────────────────────────── */

/* globe fills screen */
.globe-wrapper,
#globeViz {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  /* Fallback 100vh then dynamic viewport to avoid URL bar jumps on mobile */
  height: 100vh;
  height: 100dvh;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: margin-right 0.5s ease;
  /* Prevent copy/paste and context menu on long press */
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
  /* Prevent context menu on right click */
  -webkit-context-menu: none;
  -moz-context-menu: none;
  -ms-context-menu: none;
}



/* ───── SEARCH SUGGESTIONS ─────────────────────────────────────────────── */

#searchSuggestions {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: rgba(0, 0, 0, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  margin-top: 5px;
  max-height: 200px;
  overflow-y: auto;
  z-index: 10000;
  backdrop-filter: blur(10px);
  list-style: none;
  padding: 0;
  margin: 0;
  display: none;
  /* Ensure it's above everything */
  pointer-events: auto;
}

#searchSuggestions li {
  padding: 12px 16px;
  color: #fff;
  cursor: pointer;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  transition: background 0.2s ease;
}

#searchSuggestions li:last-child {
  border-bottom: none;
}

#searchSuggestions li:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* ───── PANEL STYLES ─────────────────────────────────────────────────── */

/* common panels (more transparent) */
.panel {
  position: absolute;
  background: rgba(0, 0, 0, 0.8);
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(20px);
  z-index: 1001;
  animation: fadeInUp 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.hidden {
  display: none;
}

/* flight controls panel */
#flightControls {
  top: 90px;
  left: 20px;
}

#flightControls label {
  display: block;
  margin: 12px 0 6px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.8);
  font-weight: 500;
}

#flightControls input[type="text"] {
  width: 95%;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 6px;
  font-size: 14px;
  box-sizing: border-box;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  transition: all 0.2s ease;
}

#flightControls input[type="text"]:focus {
  outline: none;
  border-color: #79756A;
  background: rgba(255, 255, 255, 0.15);
}

#departureSuggestions,
#arrivalSuggestions,
.suggestions-list {
  list-style: none;
  margin: 4px 0 0;
  padding: 0;
  background: rgba(0, 0, 0, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 6px;
  max-height: 150px;
  overflow-y: auto;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
  display: none;
}

#departureSuggestions li,
#arrivalSuggestions li,
.suggestions-list li {
  padding: 10px 12px;
  cursor: pointer;
  color: #fff;
  font-size: 13px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  transition: background 0.2s ease;
}

#departureSuggestions li:last-child,
#arrivalSuggestions li:last-child,
.suggestions-list li:last-child {
  border-bottom: none;
}

#departureSuggestions li:hover,
#arrivalSuggestions li:hover,
.suggestions-list li:hover {
  background: rgba(121, 117, 106, 0.3);
}

/* action buttons */
#calculateRoute,
#clearRoute {
  width: 95%;
  padding: 12px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  transition: all 0.2s ease;
  margin-bottom: 10px;
}

#calculateRoute {
  margin-top: 15px;
  background: #79756A;
  color: #fff;
}

#calculateRoute:hover {
  background: #5e5b52;
  transform: translateY(-1px);
}

#clearRoute {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

#clearRoute:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

/* flight info panel */
#flightInfo {
  top: 90px;
  right: 20px;
  width: 400px;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
}

#flightInfo table {
  width: 100%;
  border-spacing: 0;
  margin: 10px 0;
}

#flightInfo td {
  padding: 6px 0;
  line-height: 1.4;
}

#flightInfo summary:hover {
  color: #add8e6;
}

/* embassy filter menu */
.embassy-menu.hidden {
  display: none;
}

.embassy-menu {
  position: fixed;
  top: 80px;
  left: 20px;
  background: rgba(0, 0, 0, 0.9);
  color: #fff;
  padding: 16px;
  border-radius: 8px;
  z-index: 1001;
  max-height: 80vh;
  overflow-y: auto;
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
}

.embassy-menu select,
.embassy-menu button {
  width: 100%;
  margin-top: 10px;
  padding: 10px;
  border: none;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.2s ease;
}

.embassy-menu select {
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.embassy-menu button:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* tooltip */
#tooltip {
  position: absolute;
  padding: 8px 12px;
  background: rgba(0, 0, 0, 0.9);
  color: #fff;
  border-radius: 6px;
  pointer-events: none;
  font-size: 13px;
  display: none;
  z-index: 1000;
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
}

/* ───── CHATBOT STYLES ─────────────────────────────────────────────────── */

/* bring chat above buttons */
.chatbot-popup {
  z-index: 2000;
  border: 2px solid #79756A;
  border-radius: 24px;
  padding: 16px;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  position: fixed;
  right: 20px;
  bottom: 90px;
  width: 100%;
  max-width: 420px;
  height: 75vh;
  opacity: 0;
  pointer-events: none;
  transform: scale(0.8);
  transform-origin: bottom right;
  transition: all .2s ease;
}

body.show-chatbot .chatbot-popup {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
}

/* toggler */
#chatbot-toggler {
  background: #ffffff;
  border-radius: 50%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  position: fixed;
  bottom: calc(30px + env(safe-area-inset-bottom));
  right: calc(35px + env(safe-area-inset-right));
  width: 50px;
  height: 50px;
  border: none;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  transition: all 0.2s ease;
  z-index: 1002;
}

body.show-chatbot #chatbot-toggler {
  transform: rotate(90deg);
}

.chatbot-icon {
  width: 36px;
  height: 36px;
  transition: opacity 0.2s ease;
  position: absolute;
  padding: 2px;
}

.chatbot-icon.close-icon {
  filter: brightness(0);
}

/* Nur Logo anzeigen, wenn Chatbot ZU ist */
.logo-icon {
  opacity: 1;
  visibility: visible;
}

.close-icon {
  opacity: 0;
  visibility: hidden;
}

/* Wenn Chatbot geöffnet ist – umgekehrt */
body.show-chatbot .logo-icon {
  opacity: 0;
  visibility: hidden;
}

body.show-chatbot .close-icon {
  opacity: 1;
  visibility: visible;
}

/* chat header */
.chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 0 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.chat-header .header-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.chat-header .logo-text {
  color: #fff;
  font-weight: 600;
  font-size: 1.2rem;
  white-space: nowrap;
}

#close-chatbot {
  background: none;
  border: none;
  color: #fff;
  width: 36px;
  height: 36px;
  font-size: 1.5rem;
  cursor: pointer;
  border-radius: 50%;
  transition: background .2s;
}

#close-chatbot:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* chat body */
.chat-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px 12px;
  -webkit-overflow-scrolling: touch;
}

/* bubble styling */
.chat-body .message-text {
  display: inline-block;
  max-width: 70%;
  border-top: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  background: #2a2a2a;
  color: #e6e6e6;
  border-radius: 20px;
  padding: 12px 16px;
}

.user-message .message-text {
  margin: 8px 0;
}

.chat-body .bot-message {
  justify-content: flex-start;
}

.chat-body .user-message {
  justify-content: flex-end;
}

.chat-body .bot-message .message-text {
  margin-right: 8px;
}

.chat-body .user-message .message-text {
  margin-left: 8px;
}

/* scrollbar */
.chat-body::-webkit-scrollbar {
  width: 6px;
}

.chat-body::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 3px;
}

/* chat footer */
.chat-footer {
  padding: 10px 0 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.chat-form {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 32px;
  padding: 6px 12px;
}

.message-input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  color: #fff;
  font-size: .95rem;
  height: 40px;
  resize: none;
}

.message-input::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.chat-controls button {
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 50%;
  background: #79756A;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  transition: background .2s;
}

.chat-controls button:hover {
  background: #5e5b52;
}

/* animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* responsive tweaks */

/* Extra extra large (xxl) - ≥ 1400px */
@media (min-width: 1400px) {
  .search-container {
    max-width: 500px;
    flex: 0 1 500px;
  }

  .header-content {
    gap: 25px;
  }
}

/* Extra large (xl) - ≥ 1200px */
@media (min-width: 1200px) and (max-width: 1399px) {
  .search-container {
    max-width: 450px;
    flex: 0 1 450px;
  }

  .header-content {
    gap: 22px;
  }
}

/* Large (lg) - ≥ 992px */
@media (min-width: 992px) and (max-width: 1199px) {
  .search-container {
    max-width: 400px;
    flex: 0 1 400px;
  }

  .header-content {
    gap: 20px;
  }
}

/* Medium (md) - ≥ 768px */
@media (min-width: 768px) and (max-width: 991px) {
  .search-container {
    max-width: 350px;
    flex: 0 1 350px;
  }

  .header-content {
    gap: 18px;
  }
}

/* Small (sm) - ≥ 576px */
@media (min-width: 576px) and (max-width: 767px) {
  .main-header {
    padding: 0 15px;
  }

  .header-content {
    gap: 15px;
  }

  .search-container {
    max-width: 200px;
    flex: 0 1 200px;
  }

  .profile-placeholder {
    width: 35px;
    height: 35px;
  }

  .profile-placeholder span {
    font-size: 16px;
  }

}

/* X-Small - < 576px */
@media (max-width: 575px) {
  .sidebar-nav .sidebar-btn.flight,
  .sidebar-nav .sidebar-btn.embassy,
  .sidebar-nav .sidebar-btn.camera,
  .sidebar-nav .sidebar-btn.risk {display:none !important;}

  /* Ultra-compact sidebar */
  body.show-sidebar #sidebar-menu {width:200px !important;}
  #sidebar-menu .sidebar-nav {padding:16px 12px 0 12px;}
  #sidebar-menu .sidebar-btn {padding:10px 12px; font-size:13px;}
  #sidebar-menu .sidebar-btn .sidebar-icon {width:16px !important; height:16px !important;}
  .sidebar-login-btn {padding:12px 14px !important; font-size:13px !important;}
  .search-container {
    max-width: 150px;
    flex: 0 1 150px;
  }

  .search-container input {
    font-size: 12px;
    padding: 6px 10px;
  }

  .profile-placeholder {
    width: 32px;
    height: 32px;
  }

  .profile-placeholder span {
    font-size: 14px;
  }

  .hamburger-btn {
    width: 44px;
    height: 44px;
  }

  .hamburger-btn .hamburger-icon {
    font-size: 18px;
  }

  #flightControls {
    width: calc(100% - 20px);
    left: 10px;
    right: 10px;
    top: calc(80px + env(safe-area-inset-top));
  }

  #flightInfo {
    right: 10px;
    left: 10px;
    width: calc(100% - 20px);
  }

  .chatbot-popup {
    position: fixed;
    left: 8px;
    right: 8px;
    bottom: calc(100px + env(safe-area-inset-bottom));
    width: auto;
    max-width: none;
    height: 75vh;
    box-sizing: border-box;
    padding: 10px;
    border-radius: 16px;
  }

  #chatbot-toggler {
    right: calc(15px + env(safe-area-inset-right));
    bottom: calc(15px + env(safe-area-inset-bottom));
    width: 50px;
    height: 50px;
  }
}

.icon-svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
  vertical-align: middle;
}

/* Keep flight panel pinned left even when the right sidebar is open */
body.show-sidebar #leftInfoSlot {
  left: 20px !important;
}

@media (max-width: 768px) {
  body.show-sidebar #leftInfoSlot {
    left: 10px !important;
  }
}


/* Make Flight Route Calculator match Embassy Filter */
#flightControls.sidebar-section {
  background: rgba(255, 255, 255, 0.05) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: 12px !important;
  padding: 20px !important;
}

#flightControls.sidebar-section h3 {
  border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
  padding-bottom: 10px;
  margin: 0 0 15px 0;
  font-size: 16px;
  font-weight: 600;
}

/* Use the same input style as embassy section */
#flightControls.sidebar-section input[type="text"] {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 12px;
  transition: all .2s ease;
}

/* Put the action buttons on one row like the embassy panel */
#flightControls .actions {
  display: flex;
  gap: 8px;
  margin-top: 15px;
  flex-direction: column;
}

#flightControls .action-btn {
  flex: 1px;
  width: auto;
}

/* Override the actions container to stack embassy buttons vertically */
#embassyControls .actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 15px;
}

#embassyControls .action-btn {
  flex: none;
  width: auto;
}

/* ──── ENHANCED COUNTRY PANEL STYLES - Two Stage System ──────────────────────────── */

#countryInfoPanel {
  position: fixed;
  top: calc(90px + env(safe-area-inset-top));
  left: 20px;
  width: 320px;
  /* Stage 1: Enhanced minimized width (was 280px) */
  background: rgba(0, 0, 0, 0.95);
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(20px);
  z-index: 1001;
  display: none;
  border: 1px solid rgba(255, 255, 255, 0.15);
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  animation: slideInLeft 0.3s ease-out;
  max-height: calc(100vh - 120px);
}

/* Stage 2: Expanded state */
#countryInfoPanel.expanded {
  width: 480px;
  /* Stage 2: Expanded width (increased from 450px) */
  max-height: calc(100vh - 120px);
}

#countryInfoPanel.show {
  display: block;
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-100%);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* ──── STAGE 1: ENHANCED MINIMIZED VIEW ──────────────────────────── */

.country-panel-minimized {
  padding: 16px;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.country-panel-minimized::-webkit-scrollbar {
  width: 4px;
}

.country-panel-minimized::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 2px;
}

.minimized-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  flex-shrink: 0;
}

.country-flag-mini {
  width: 45px;
  height: 34px;
  border-radius: 6px;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.country-title-mini {
  flex: 1;
  min-width: 0;
}

.country-title-mini h3 {
  margin: 0;
  color: white;
  font-size: 17px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}

.country-title-mini .country-code {
  color: rgba(255, 255, 255, 0.65);
  font-size: 13px;
  margin-top: 2px;
  font-weight: 500;
}

.expand-icon {
  width: 36px;
  height: 36px;
  background: rgba(52, 152, 219, 0.15);
  border: 1px solid rgba(52, 152, 219, 0.3);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.expand-icon:hover {
  background: rgba(52, 152, 219, 0.25);
  border-color: rgba(52, 152, 219, 0.5);
  transform: scale(1.05);
}

.expand-icon svg {
  width: 18px;
  height: 18px;
  stroke: #3498DB;
  transition: transform 0.3s ease;
}

.expanded .expand-icon svg {
  transform: rotate(180deg);
}

/* Enhanced quick stats grid */
.quick-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 12px;
  flex-shrink: 0;
}

.stat-item {
  background: rgba(255, 255, 255, 0.08);
  padding: 10px 8px;
  border-radius: 8px;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: background 0.2s ease;
}

.stat-item:hover {
  background: rgba(255, 255, 255, 0.12);
}

.stat-value {
  color: white;
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
}

.stat-label {
  color: rgba(255, 255, 255, 0.7);
  font-size: 11px;
  margin-top: 4px;
  font-weight: 500;
}

/* Enhanced risk indicator */
.risk-indicator-mini {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  flex-shrink: 0;
}

.risk-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.3);
}

.risk-dot.low {
  background: #27AE60;
}

.risk-dot.medium {
  background: #F39C12;
}

.risk-dot.high {
  background: #E74C3C;
}

.risk-info {
  flex: 1;
  min-width: 0;
}

.risk-text-mini {
  color: white;
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
}

.risk-details-mini {
  font-size: 11px;
  margin-top: 2px;
  opacity: 0.8;
  line-height: 1.2;
}

/* Loading state for minimized view */
.minimized-loading {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  margin-bottom: 12px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 12px;
  flex-shrink: 0;
}

.mini-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-top: 2px solid #3498DB;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

/* ──── CONTENT SECTIONS IN MINIMIZED VIEW ──────────────────────────── */

.minimized-content-sections {
  flex: 1;
  overflow-y: auto;
  margin-bottom: 12px;
}

.mini-content-section {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  margin-bottom: 8px;
  overflow: hidden;
  transition: all 0.3s ease;
}

.mini-content-section.expanded {
  background: rgba(52, 152, 219, 0.1);
  border-color: rgba(52, 152, 219, 0.3);
}

.mini-section-header:hover {
  background: rgba(255, 255, 255, 0.08);
}

.mini-section-info {
  flex: 1;
  min-width: 0;
}

.mini-section-title {
  margin: 0;
  color: white;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
}

.mini-section-badge {
  color: rgba(255, 255, 255, 0.6);
  font-size: 10px;
  margin-top: 2px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.mini-section-arrow {
  color: rgba(255, 255, 255, 0.6);
  font-size: 14px;
  transition: all 0.3s ease;
  transform-origin: center;
}

.mini-content-section.expanded .mini-section-arrow {
  transform: rotate(180deg);
  color: #3498DB;
}

.mini-section-content {
  max-height: 0;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  opacity: 0;
}

.mini-section-content.active {
  max-height: 300px;
  padding: 0 14px 14px;
  opacity: 1;
}

.content-preview {
  color: rgba(255, 255, 255, 0.85);
  font-size: 13px;
  line-height: 1.4;
  margin-bottom: 8px;
}

.content-preview p {
  margin: 0 0 8px 0;
}

.read-more-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(52, 152, 219, 0.15);
  border: 1px solid rgba(52, 152, 219, 0.3);
  color: #3498DB;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-top: 4px;
}

.read-more-btn:hover {
  background: rgba(52, 152, 219, 0.25);
  border-color: rgba(52, 152, 219, 0.5);
  transform: translateY(-1px);
}

.read-more-btn svg {
  fill: currentColor;
  transition: transform 0.2s ease;
}

.read-more-btn:hover svg {
  transform: translateX(2px);
}

/* ──── ACTION BUTTONS IN MINIMIZED VIEW ──────────────────────────── */

.country-actions-mini {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  flex-shrink: 0;
}

.country-actions-mini .action-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px 6px;
  border: none;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: white;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
}

.country-actions-mini .action-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.2);
}

.country-actions-mini .action-icon {
  font-size: 16px;
  flex-shrink: 0;
}

.country-actions-mini .action-btn span {
  line-height: 1;
}

/* Specific button hover colors */
.country-actions-mini .security-action:hover {
  background: rgba(231, 76, 60, 0.2);
  border-color: rgba(231, 76, 60, 0.4);
}

.country-actions-mini .contact-action:hover {
  background: rgba(46, 204, 113, 0.2);
  border-color: rgba(46, 204, 113, 0.4);
}

.country-actions-mini .travel-action:hover {
  background: rgba(155, 89, 182, 0.2);
  border-color: rgba(155, 89, 182, 0.4);
}

/* ──── RESPONSIVE ADJUSTMENTS ──────────────────────────── */

@media (max-width: 768px) {
  #countryInfoPanel {
    left: 10px;
    right: 10px;
    width: auto;
    max-width: calc(100vw - 20px);
  }

  #countryInfoPanel.expanded {
    width: auto;
    right: 10px;
  }

  .minimized-header {
    flex-wrap: wrap;
    gap: 8px;
  }

  .country-flag-mini {
    width: 40px;
    height: 30px;
  }

  .expand-icon {
    width: 32px;
    height: 32px;
  }

  .country-actions-mini {
    grid-template-columns: 1fr 1fr;
    gap: 6px;
  }

  .country-actions-mini .action-btn {
    padding: 8px 4px;
    font-size: 10px;
  }
}

/* Performance-friendly visuals on small screens */
@media (max-width: 768px) {
  .panel {
    backdrop-filter: blur(8px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.45);
  }
  .chatbot-popup {
    backdrop-filter: blur(8px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
  }
  .main-header {
    backdrop-filter: blur(8px);
  }
  .sidebar-menu {
    backdrop-filter: blur(12px);
  }
  .chat-controls button {
    width: 40px;
    height: 40px;
  }
}

/* Accessible focus styles */
button:focus-visible,
.sidebar-btn:focus-visible,
.action-btn:focus-visible,
#chatbot-toggler:focus-visible,
.hamburger-btn:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.7);
  outline-offset: 2px;
}

@media (max-width: 480px) {
  #countryInfoPanel {
    left: 5px;
    right: 5px;
    width: auto;
    max-width: calc(100vw - 10px);
  }

  .country-title-mini h3 {
    font-size: 15px;
  }

  .quick-stats {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .stat-item {
    padding: 8px;
  }

  .mini-section-title {
    font-size: 13px;
  }

  .content-preview {
    font-size: 12px;
  }
}

.close-emergency-btn {
  width: 28px;
  height: 28px;
  background: rgba(231, 76, 60, 0.15);
  border: 1px solid rgba(231, 76, 60, 0.3);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  padding: 0;
  color: #E74C3C;
}

.close-emergency-btn:hover {
  background: rgba(231, 76, 60, 0.25);
  border-color: rgba(231, 76, 60, 0.5);
  transform: scale(1.05);
}

.close-emergency-btn svg {
  stroke: currentColor;
  transition: transform 0.2s ease;
}

.close-emergency-btn:hover svg {
  transform: rotate(90deg);
}



.close-btn-mini {
  width: 28px;
  height: 28px;
  background: rgba(231, 76, 60, 0.15);
  border: 1px solid rgba(231, 76, 60, 0.3);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  padding: 0;
  color: #E74C3C;
}

.close-btn-mini:hover {
  background: rgba(231, 76, 60, 0.25);
  border-color: rgba(231, 76, 60, 0.5);
  transform: scale(1.05);
}

.close-btn-mini svg {
  stroke: currentColor;
  transition: transform 0.2s ease;
}

.close-btn-mini:hover svg {
  transform: rotate(90deg);
}



.close-btn {
  position: absolute;
  top: 15px;
  right: 50px;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.8);
  font-size: 20px;
  cursor: pointer;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s ease;
}

.close-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: white;
}

.minimize-btn {
  position: absolute;
  top: 15px;
  right: 15px;
  background: rgba(52, 152, 219, 0.2);
  border: 1px solid rgba(52, 152, 219, 0.4);
  color: #3498DB;
  cursor: pointer;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s ease;
  font-size: 14px;
}

.minimize-btn:hover {
  background: rgba(52, 152, 219, 0.4);
  border-color: rgba(52, 152, 219, 0.6);
}

.expanded-header-content {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-right: 70px;
}

.country-landscape {
  width: 80px;
  height: 60px;
  border-radius: 8px;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.2);
}

.country-title-expanded h1 {
  margin: 0;
  color: white;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.2;
}

.country-risk-score {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
}

.risk-circle {
  width: 50px;
  height: 50px;
  position: relative;
}

.risk-circle svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.risk-circle-bg {
  fill: none;
  stroke: rgba(255, 255, 255, 0.2);
  stroke-width: 4;
}

.risk-circle-progress {
  fill: none;
  stroke-width: 4;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.5s ease;
}

.risk-score-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-size: 14px;
  font-weight: bold;
}

.risk-level {
  color: white;
  font-size: 14px;
  font-weight: 500;
}

/* Expanded content area */
.expanded-content {
  padding: 0;
  height: calc(100% - 140px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.expanded-content::-webkit-scrollbar {
  width: 6px;
}

.expanded-content::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 3px;
}

.country-section {
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.section-header {
  padding: 16px 20px;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.05);
  transition: background 0.2s ease;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.section-header:hover {
  background: rgba(255, 255, 255, 0.1);
}

.section-header.active {
  background: rgba(52, 152, 219, 0.2);
}

.section-title {
  color: white;
  font-size: 16px;
  font-weight: 600;
  margin: 0;
}

.section-arrow {
  color: rgba(255, 255, 255, 0.6);
  font-size: 18px;
  transition: transform 0.3s ease;
}

.section-header.active .section-arrow {
  transform: rotate(180deg);
}

.section-content {
  padding: 0 20px;
  max-height: 0;
  overflow: hidden;
  transition: all 0.3s ease;
}

.section-content.active {
  max-height: 1000px;
  padding: 20px;
}

.section-content p {
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.6;
  margin: 0 0 15px 0;
  font-size: 14px;
}

.country-graph {
  width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 15px 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Loading and error states */
.country-loading,
.country-error {
  padding: 30px 20px;
  text-align: center;
  color: white;
}

.spinner {
  width: 30px;
  height: 30px;
  border: 3px solid rgba(255, 255, 255, 0.1);
  border-top: 3px solid #3498DB;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 15px;
}

/* Move left panel when sidebar is open */
body.show-sidebar #countryInfoPanel {
  left: calc(20px + var(--sidebar-width, 320px));
}

@media (max-width: 768px) {
  body.show-sidebar #countryInfoPanel {
    left: calc(10px + var(--sidebar-width, 280px));
  }
}

-header {
  padding: 12px 14px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background 0.2s ease;
}

.mini-section-header {
  padding: 12px 14px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background 0.2s ease;
}

/* Ensure sidebar icons are always visible */
.sidebar-icon {
  width: 18px !important;
  height: 18px !important;
  flex-shrink: 0;
  filter: brightness(0) invert(1) !important;
  transition: all 0.2s ease;
  display: block !important;
  opacity: 1 !important;
  visibility: visible !important;
}

/* Maintain icon visibility in active states */
.sidebar-btn.active .sidebar-icon {
  filter: brightness(0) invert(1) !important;
  opacity: 1 !important;
  visibility: visible !important;
}

/* Specific overrides for flight and embassy icons */
#sidebarFlightToggle .sidebar-icon,
#sidebarEmbassyToggle .sidebar-icon {
  filter: brightness(0) invert(1) !important;
  opacity: 1 !important;
  visibility: visible !important;
  display: block !important;
}

/* Ensure icons don't get hidden by other CSS rules */
.sidebar-btn .sidebar-icon {
  position: relative !important;
  z-index: 1 !important;
}

/* Force icon display even when button state changes */
.sidebar-nav .sidebar-btn .sidebar-icon {
  filter: brightness(0) invert(1) !important;
  opacity: 1 !important;
  visibility: visible !important;
  display: block !important;
}

/* SIDEBAR SECTIONS STYLING */
.sidebar-section {
  margin: 20px;
  padding: 20px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-section h3 {
  margin: 0 0 15px 0;
  font-size: 16px;
  color: #fff;
  font-weight: 600;
  text-align: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  min-height: 44px; /* Touch target */
  padding-bottom: 10px;
}

.sidebar-section label {
  display: block;
  margin: 12px 0 6px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.8);
  font-weight: 500;
}

.sidebar-section input[type="text"] {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 6px;
  font-size: 12px;
  box-sizing: border-box;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  transition: all 0.2s ease;
}

.sidebar-section input[type="text"]:focus {
  outline: none;
  border-color: #79756A;
  background: rgba(255, 255, 255, 0.15);
}

.sidebar-section .suggestions-list {
  list-style: none;
  margin: 4px 0 0;
  padding: 0;
  background: rgba(0, 0, 0, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 6px;
  max-height: 120px;
  overflow-y: auto;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
  display: none;
}

.sidebar-section .suggestions-list li {
  padding: 8px 10px;
  cursor: pointer;
  color: #fff;
  font-size: 11px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  transition: background 0.2s ease;
}

.sidebar-section .suggestions-list li:last-child {
  border-bottom: none;
}

.sidebar-section .suggestions-list li:hover {
  background: rgba(121, 117, 106, 0.3);
}

.sidebar-section .actions {
  display: flex;
  gap: 8px;
  margin-top: 15px;
}

.sidebar-section .action-btn {
  flex: 1;
  padding: 10px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  transition: all 0.2s ease;
}

.sidebar-section .action-btn:not(.clear) {
  background: #79756A;
  color: #fff;
}

.sidebar-section .action-btn:not(.clear):hover {
  background: #5e5b52;
  transform: translateY(-1px);
}

.sidebar-section .action-btn.clear {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.sidebar-section .action-btn.clear:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

/* LEFT INFO PANEL STYLING */
.left-info-slot {
  position: fixed;
  top: 90px;
  left: 20px;
  width: 350px;
  max-height: calc(100vh - 120px);
  background: rgba(0, 0, 0, 0.9);
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(20px);
  z-index: 1001;
  color: white;
  font-size: 13px;
  line-height: 1.4;
  overflow-y: auto;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: left 0.5s ease;
}

.left-info-slot #flightControls {
  margin-top: 16px;
}

.left-flight-controls-host:empty {
  display: none;
}

.left-info-divider {
  width: 100%;
  height: 1px;
  margin: 16px 0;
  background: rgba(255, 255, 255, 0.1);
}

.flight-info-dismiss {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.flight-info-dismiss:hover,
.flight-info-dismiss:focus {
  background: rgba(255, 255, 255, 0.18);
  transform: translateY(-1px);
  outline: none;
}

.flight-info-reveal {
  position: fixed;
  top: 90px;
  left: 20px;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 1001;
  padding: 6px;
  transition: transform 0.2s ease, background 0.2s ease;
}

.flight-info-reveal:not(.hidden) {
  display: flex;
}

.flight-info-reveal img {
  width: 100%;
  height: auto;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.6));
}

.flight-info-reveal:hover,
.flight-info-reveal:focus {
  background: rgba(0, 0, 0, 0.92);
  transform: translateY(-2px);
  outline: none;
}

.embassy-info-reveal {
  position: fixed;
  top: 90px;
  left: 20px;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 1001;
  padding: 6px;
  transition: transform 0.2s ease, background 0.2s ease;
}

.embassy-info-reveal:not(.hidden) {
  display: flex;
}

.embassy-info-reveal img {
  width: 100%;
  height: auto;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.6));
}

.embassy-info-reveal:hover,
.embassy-info-reveal:focus {
  background: rgba(0, 0, 0, 0.92);
  transform: translateY(-2px);
  outline: none;
}

#embassyInfoSlot {
  top: 90px;
  left: 20px;
}

.left-info-slot .left-info-description {
  margin: 0 0 12px 0;
  color: rgba(255, 255, 255, 0.78);
  text-align: center;
  font-size: 13px;
}

.left-info-slot #embassyControls {
  margin-top: 12px;
}

.left-embassy-controls-host:empty {
  display: none;
}

#embassyControls.sidebar-section {
  background: rgba(255, 255, 255, 0.05) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: 12px !important;
  box-shadow: none !important;
  padding: 16px !important;
}

#embassyControls.sidebar-section h3 {
  margin-top: 0;
  text-align: center;
}

.left-info-slot h3 {
  margin: 0 0 15px 0;
  font-size: 18px;
  color: #4ecdc4;
  font-weight: 600;
  text-align: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 10px;
}

#leftInfoTitle,
#embassyInfoTitle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
}

#leftInfoTitle .info-title-icon,
#embassyInfoTitle .info-title-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  line-height: 1;
}

#leftInfoTitle .info-title-icon img,
#embassyInfoTitle .info-title-icon img {
  width: 20px;
  height: 20px;
}

#embassyInfoContent {
  margin-bottom: 16px;
  text-align: left;
  font-size: 14px;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.85);
}

#embassyInfoContent > *:first-child {
  margin-top: 0;
}

#embassyInfoContent > *:last-child {
  margin-bottom: 0;
}

.left-info-slot table {
  width: 100%;
  border-spacing: 0;
  margin: 10px 0;
}

.left-info-slot td {
  padding: 6px 0;
  line-height: 1.4;
}

.left-info-slot summary {
  cursor: pointer;
  padding: 8px 0;
  font-weight: 600;
  color: #4ecdc4;
}

.left-info-slot summary:hover {
  color: #add8e6;
}

.left-info-slot details {
  margin: 10px 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  overflow: hidden;
}

.left-info-slot details[open] {
  background: rgba(255, 255, 255, 0.05);
}

/* Move left panel when sidebar is open */
body.show-sidebar .left-info-slot {
  left: calc(20px + var(--sidebar-width, 320px));
}

/* CHATBOT POSITIONING WITH SIDEBAR */
#chatbot-toggler {
  transition: transform 0.2s ease, right 0.35s ease, bottom 0.35s ease;
}

@media (min-width: 769px) {
  body.show-sidebar #chatbot-toggler {
    right: calc(var(--sidebar-width, 320px) + 35px + env(safe-area-inset-right, 0px));
  }

  body.show-sidebar .chatbot-popup {
    right: calc(20px + var(--sidebar-width, 320px));
    left: auto;
  }

  body.show-sidebar .mobile-fab-group {
    right: calc(32px + var(--sidebar-width, 320px));
  }
}

@media (max-width: 575px) {
  body.show-sidebar .chatbot-popup {
    right: 8px;
    left: 8px;
    width: auto;
  }
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .left-info-slot {
    width: 280px;
    left: 10px;
    padding: 15px;
  }

  body.show-sidebar .left-info-slot {
    left: calc(10px + var(--sidebar-width, 280px));
  }
}

.chatbot-popup panel.hidden {
  display: none !important;
}

.camera-marker {
  position: absolute;

  width: 40px;
  height: 40px;
  pointer-events: auto;
  opacity: 1;
  display: block;
}

/* Sidebar Login Button */
.sidebar-login {
  position: absolute;
  bottom: 20px;
  left: 20px;
  right: 20px;
}

.sidebar-login-btn {
  width: 95%;
  padding: 14px 16px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  background: linear-gradient(135deg, #12aae0 0%, #12aae0 100%);
  color: #fff;
  font-size: 14px;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease, border-color 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
  background-clip: padding-box;
}

.sidebar-login-btn:hover {
  background: linear-gradient(135deg, #3498DB 0%, #2980B9 100%);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(41, 128, 185, 0.4);
  border-color: rgba(52, 152, 219, 0.4);
}




.sidebar-login-btn .login-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.sidebar-login-btn span {
  font-weight: 600;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .sidebar-login {
    bottom: 15px;
    left: 15px;
    right: 15px;
  }

  .sidebar-login-btn {
    padding: 12px 14px;
    font-size: 13px;
  }
}


.login-body * {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

.login-body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
  background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 50%, #2d1b2e 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  color: #fff;
}

.login-container {
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 40px;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
  position: relative;
  overflow: hidden;
}


.logo-section {
  text-align: center;
  margin-bottom: 40px;
}

.logo {
  width: 60px;
  height: 60px;
  background: #fff;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  box-shadow: 0 8px 25px rgba(255, 255, 255, 0.1);
}

.logo img {
  width: 32px;
  height: 32px;
}

.welcome-text h1 {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 8px;
  background: linear-gradient(135deg, #fff 0%, #ccc 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.welcome-text p {
  color: rgba(255, 255, 255, 0.7);
  font-size: 15px;
  line-height: 1.4;
}

.auth-form {
  margin-bottom: 30px;
}

.form-step {
  display: none;
  animation: fadeInUp 0.5s ease-out;
}

.form-step.active {
  display: block;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
}

.form-input {
  width: 100%;
  padding: 16px;
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  font-size: 16px;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.form-input:focus {
  outline: none;
  border-color: #3498DB;
  background: rgba(52, 152, 219, 0.1);
  box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
}

.form-input::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.otp-inputs {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-bottom: 20px;
}

.otp-input {
  width: 50px;
  height: 50px;
  text-align: center;
  font-size: 20px;
  font-weight: 700;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  transition: all 0.3s ease;
}

.otp-input:focus {
  outline: none;
  border-color: #27AE60;
  background: rgba(39, 174, 96, 0.1);
  box-shadow: 0 0 0 3px rgba(39, 174, 96, 0.2);
}

.auth-button {
  width: 100%;
  padding: 16px;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  position: relative;
  overflow: hidden;
}

.auth-button.primary {
  background: linear-gradient(135deg, #2980B9 0%, #2980B9 100%);
  color: #fff;
  box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
}

.auth-button.primary:hover {
  background: linear-gradient(135deg, #2980B9 0%, #21618C 100%);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(52, 152, 219, 0.4);
}

.auth-button.secondary {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.auth-button.secondary:hover {
  background: rgba(255, 255, 255, 0.2);
}

.auth-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid transparent;
  border-top: 2px solid currentColor;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

.divider {
  position: relative;
  text-align: center;
  margin: 30px 0;
  color: rgba(255, 255, 255, 0.5);
  font-size: 14px;
}

.divider::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: rgba(255, 255, 255, 0.1);
}

.divider span {
  background: rgba(0, 0, 0, 0.85);
  padding: 0 20px;
  position: relative;
}

.oauth-buttons {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.oauth-btn {
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-size: 15px;
  font-weight: 500;
}

.oauth-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-1px);
}

.oauth-btn.google {
  background: rgba(238, 197, 193, 0.1);
  border-color: rgba(234, 67, 53, 0.3);
}


.oauth-btn.apple {
  background: rgba(0, 0, 0, 0.8);
  border-color: rgba(255, 255, 255, 0.3);
  color: #fff;
}

.oauth-btn.apple:hover {
  background: rgba(0, 0, 0, 0.9);
}

.back-button {
  color: #3498DB;
  background: none;
  border: none;
  font-size: 14px;
  cursor: pointer;
  padding: 8px 0;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: color 0.3s ease;
  margin-bottom: 20px;
}

.back-button:hover {
  color: #2980B9;
}

.resend-timer {
  text-align: center;
  margin-top: 15px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.6);
}

.resend-link {
  color: #3498DB;
  cursor: pointer;
  text-decoration: none;
  font-weight: 500;
}

.resend-link:hover {
  text-decoration: underline;
}

.footer-links {
  text-align: center;
  margin-top: 30px;
  font-size: 14px;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.6);
  text-decoration: none;
  margin: 0 10px;
  transition: color 0.3s ease;
}

.footer-links a:hover {
  color: #fff;
}

/* Mobile Responsiveness */
@media (max-width: 480px) {
  .login-container {
    padding: 30px 25px;
    margin: 10px;
  }

  .welcome-text h1 {
    font-size: 24px;
  }

  .otp-input {
    width: 45px;
    height: 45px;
    font-size: 18px;
  }

  .otp-inputs {
    gap: 8px;
  }
}

.success-message {
  background: rgba(39, 174, 96, 0.1);
  border: 1px solid rgba(39, 174, 96, 0.3);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 20px;
  text-align: center;
  color: #27AE60;
  font-size: 14px;
  display: none;
}

.error-message {
  background: rgba(231, 76, 60, 0.1);
  border: 1px solid rgba(231, 76, 60, 0.3);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 20px;
  text-align: center;
  color: #E74C3C;
  font-size: 14px;
  display: none;
}

body {
  font-family: 'Inter', sans-serif;
  background: #1a1a1a;
  color: white;
  margin: 0;
  padding: 20px;
}

/* Emergency Modal - Complete Enhanced Version */
.emergency-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 10005;
  padding: 20px;
  backdrop-filter: blur(5px);
}

.emergency-modal.show {
  display: flex;
}

.emergency-modal-content {
  background: #1F2937;
  border-radius: 16px;
  max-width: 800px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  border: 2px solid #DC2626;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.7);
  position: relative;
}

.emergency-header {
  padding: 24px;
  border-bottom: 1px solid rgba(220, 38, 38, 0.3);
  background: rgba(220, 38, 38, 0.1);
  border-radius: 14px 14px 0 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(10px);
}

.emergency-header h2 {
  margin: 0;
  color: #fff;
  font-size: 24px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 12px;
}

.close-emergency-btn {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  flex-shrink: 0;
  position: relative;
}

.close-emergency-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: rotate(90deg);
}

.close-emergency-btn .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;
}

/* Categories Grid */
.emergency-categories {
  padding: 24px;
}

.emergency-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.emergency-cat {
  padding: 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  color: white;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.emergency-cat:hover {
  background: rgba(220, 38, 38, 0.2);
  border-color: rgba(220, 38, 38, 0.5);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
}

/* Procedure Content Container */
.procedure-content {
  display: none;
  position: relative;
}

.procedure-content.show {
  display: block;
}

/* Procedure Navigation Toolbar */
.proc-toolbar {
  padding: 16px 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  background: rgba(0, 0, 0, 0.9);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  position: sticky;
  top: 73px; /* Height of main header */
  z-index: 200;
  backdrop-filter: blur(15px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}
.back-arrow.emergency-proc {
  width: 40px;
  height: 40px;
  margin: 0;
  padding: 0;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  flex-shrink: 0;
}

.back-arrow.emergency-proc:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateX(-2px);
}

.back-arrow.emergency-proc svg {
  color: rgba(255, 255, 255, 0.8);
  width: 20px;
  height: 20px;
}

.proc-crumb {
  font-size: 16px;
  color: #fff;
  font-weight: 600;
}

/* Procedure Text Content Area */
#procedureText {
  padding: 24px;
  line-height: 1.6;
}

/* Procedure Title */
#procedureText > h3 {
  color: #DC2626;
  font-size: 22px;
  font-weight: 700;
  margin: 0 0 24px 0;
  padding-bottom: 12px;
  border-bottom: 2px solid rgba(220, 38, 38, 0.3);
}

/* Step Headers */
#procedureText h4 {
  color: #F59E0B;
  font-size: 16px;
  font-weight: 600;
  margin: 24px 0 12px 0;
  display: flex;
  align-items: center;
  gap: 8px;
  position: relative;
  padding-left: 12px;
}

#procedureText h4::before {
  content: '';
  position: absolute;
  left: 0;
  width: 4px;
  height: 20px;
  background: #F59E0B;
  border-radius: 2px;
}

/* Step Lists */
#procedureText ul {
  margin: 0 0 20px 0;
  padding: 0;
  list-style: none;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 8px;
  padding: 12px;
}

#procedureText li {
  position: relative;
  padding: 8px 0 8px 32px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.6;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

#procedureText li:last-child {
  border-bottom: none;
}

#procedureText li::before {
  content: '▸';
  position: absolute;
  left: 12px;
  color: #10B981;
  font-weight: bold;
  font-size: 16px;
}

/* Mobile Responsive */
@media (max-width: 480px) {
  .emergency-modal {
    padding: 10px;
  }
  
  .emergency-modal-content {
    max-width: 100%;
    max-height: 95vh;
  }
  
  .emergency-header {
    padding: 16px;
  }
  
  .emergency-header h2 {
    font-size: 18px;
  }

  .back-arrow.emergency-proc {
    width: 36px;
    height: 36px;
  }
  
  .proc-crumb {
    font-size: 14px;
  }
  
  #procedureText {
    padding: 16px;
  }
  
  #procedureText > h3 {
    font-size: 18px;
  }
  
  #procedureText h4 {
    font-size: 15px;
  }
  
  #procedureText li {
    font-size: 13px;
    padding-left: 28px;
  }
}

/* Custom Scrollbar */
.emergency-modal-content::-webkit-scrollbar {
  width: 8px;
}

.emergency-modal-content::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 4px;
}

.emergency-modal-content::-webkit-scrollbar-thumb {
  background: rgba(220, 38, 38, 0.5);
  border-radius: 4px;
}

.emergency-modal-content::-webkit-scrollbar-thumb:hover {
  background: rgba(220, 38, 38, 0.7);

}



@media (max-width: 768px) {
  .sidebar-nav .sidebar-btn.flight,
  .sidebar-nav .sidebar-btn.embassy,
  .sidebar-nav .sidebar-btn.camera,
  .sidebar-nav .sidebar-btn.risk {display:none !important;}

  /* Smaller sidebar width for compact mobile */
  body.show-sidebar #sidebar-menu {width:240px !important;}

  /* Shorten sidebar so it does not sit behind bottom nav */
  #sidebar-menu.sidebar-menu {
    height: calc(90vh - 140px); /* reserve space for bottom nav + safe area */
    padding-bottom: 24px; /* breathing space under last buttons */
  }

  body {
    padding-bottom: calc(var(--navq-mobile-bottom-nav-height, 96px) + env(safe-area-inset-bottom, 0px));
  }

  .globe-wrapper {
    padding-bottom: calc((var(--navq-mobile-bottom-nav-height, 96px) + 24px) + env(safe-area-inset-bottom, 0px));
  }

  .mobile-bottom-nav {
    display: flex;
    padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  }

  .mobile-fab-group {
    display: flex;
    bottom: calc((var(--navq-mobile-bottom-nav-height, 96px) + 8px) + env(safe-area-inset-bottom, 0px));
    pointer-events: auto;
  }

  .mobile-fab-btn.mobile-chatbot-btn {
    display: flex;
  }

  #chatbot-toggler {
    display: none;
  }

  .chatbot-popup {
    bottom: calc(128px + env(safe-area-inset-bottom, 0px));
    left: 12px;
    right: 12px;
    width: auto;
  }

  body.show-sidebar .mobile-fab-group,
  body.show-sidebar .mobile-bottom-nav {
    opacity: 0;
    pointer-events: none;
  }
}

/* Override: keep bottom nav & fabs always visible even when sidebar is open */
body.show-sidebar .mobile-bottom-nav,
body.show-sidebar .mobile-fab-group {
  opacity: 1 !important;
  pointer-events: auto !important;
}

@media (max-width: 700px) {
  :root {
    --navq-header-height: 60px;
  }

  .main-header {
    height: 60px;
    padding: 0 12px;
  }

  .header-content {
    gap: 12px;
    padding: 0;
  }

  .profile-placeholder {
    width: 30px;
    height: 30px;
  }

  .hamburger-btn {
    width: 40px;
    height: 40px;
  }

  .search-container {
    flex: 1 1 auto;
    max-width: none;
  }

  .search-container input {
    font-size: 13px;
  }

  #searchSuggestions {
    max-height: 220px;
  }

  .panel {
    left: 12px;
    right: 12px;
    width: auto;
    padding: 16px;
  }

  .chatbot-popup {
    max-height: calc(100vh - 190px);
  }

  .left-info-slot {
    top: calc(70px + env(safe-area-inset-top, 0px));
    left: 12px;
    right: 12px;
    width: auto;
    max-height: calc(100vh - 220px);
    padding: 16px;
  }

  body.show-sidebar .left-info-slot {
    left: 12px !important;
    right: 12px !important;
  }

  #countryInfoPanel {
    max-height: calc(100vh - (140px + env(safe-area-inset-bottom, 0px)));
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: clamp(72px, 18vh, 132px);
  }

  #countryInfoPanel.expanded {
    max-height: calc(100vh - (140px + env(safe-area-inset-bottom, 0px)));
  }

  #countryInfoPanel .country-panel-minimized {
    height: auto;
    max-height: none;
  }

  .mobile-fab-group {
    gap: 10px;
    right: clamp(12px, 4vw, 20px);
  }
}

