/* #region Base */
/* MARK: Base */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  height: 100vh;
  overflow: hidden;
  background: #f1f3f4;
}

/* #endregion Base */

/* #region Map & App Container */
/* MARK: Map & App Container */
#app {
  display: block;
  position: relative;
  width: 100%;
  height: 100%;
}

#map {
  position: absolute;
  inset: 0;
}

/* #endregion Map & App Container */

/* #region Search Panel */
/* MARK: Search Panel */
.search-panel {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 10;
  width: calc(100% - 24px);
  max-width: 420px;
  max-height: calc(100vh - 24px);
  overflow-y: auto;
  padding: 16px;
  border-radius: 24px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  background: #fff;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
}

/* #endregion Search Panel */

/* #region Category Tabs */
/* MARK: Category Tabs */
.ear-tabs {
  display: flex;
  margin-bottom: 16px;
  gap: 4px;
  overflow-x: auto;
  white-space: nowrap;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  background: #f1f3f4;
  border-radius: 24px;
  padding: 4px;
}

.ear-tabs::-webkit-scrollbar {
  display: none;
}

.ear-tab {
  border: none;
  background: transparent;
  padding: 8px 14px;
  border-radius: 20px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: #5f6368;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.ear-tab:hover {
  background: #f1f3f4;
}

.ear-tab[aria-selected="true"] {
  background: #202124;
  color: #fff;
}

.ear-tab svg {
  flex-shrink: 0;
}

/* #endregion Category Tabs */

/* #region Address Inputs */
/* MARK: Address Inputs */
#inputs {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.address-row {
  display: flex;
  align-items: center;
  gap: 4px;
  background: #fff;
  border: 1px solid #e8eaed;
  border-radius: 12px;
  padding: 4px 8px;
}

/* Location pin icon */
.row-icon {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  color: #5f6368;
  display: flex;
  align-items: center;
  justify-content: center;
}

.row-icon svg {
  width: 16px;
  height: 16px;
  display: block;
}

/* GPS crosshair button — inline, left of input */
.gps-btn-inline {
  flex-shrink: 0;
  background: none;
  border: none;
  cursor: pointer;
  padding: 2px;
  color: #5f6368;
  transition: color 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
}

.gps-btn-inline:hover {
  color: #1a73e8;
}

.gps-btn-inline:disabled {
  color: #bdc1c6;
  cursor: wait;
}

.gps-btn-inline svg {
  width: 16px;
  height: 16px;
  display: block;
}

/* Input Styles */
.input-group {
  position: relative;
  flex: 1;
  min-width: 0;
}

.input-with-icon {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
}

.input-wrapper {
  position: relative;
  flex: 1;
  min-width: 0;
}

.input-with-icon input {
  width: 100%;
  height: 34px;
  padding: 0 10px;
  border: none;
  border-radius: 8px;
  background: transparent;
  font-size: 14px;
  outline: none;
}

.input-with-icon input::placeholder {
  color: #9aa0a6;
}

.input-with-icon input:focus {
  background: rgba(255, 255, 255, 0.6);
}

/* GPS Button — inside input (kept for guest view) */
.gps-btn {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  color: #5f6368;
  transition: color 0.2s;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gps-btn:hover {
  color: #1a73e8;
}

.gps-btn:disabled {
  color: #bdc1c6;
  cursor: wait;
}

.gps-btn svg {
  width: 18px;
  height: 18px;
  display: block;
}

/* Transport Mode Toggle */
.transport-toggle {
  display: inline-flex;
  border: 1px solid #dadce0;
  border-radius: 20px;
  overflow: hidden;
  flex-shrink: 0;
  height: 26px;
  background: #fff;
}

.transport-toggle button {
  background: #fff;
  border: none;
  border-right: 1px solid #dadce0;
  cursor: pointer;
  padding: 0 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #5f6368;
  transition: all 0.15s;
}

.transport-toggle button:last-child {
  border-right: none;
}

.transport-toggle button:hover {
  background: #f1f3f4;
}

.transport-toggle button.active {
  background: #e8f0fe;
  color: #1a73e8;
}

.transport-toggle button:disabled {
  color: #bdc1c6;
  background: #f8f9fa;
  cursor: help;
}

.transport-toggle button:disabled:hover {
  background: #f8f9fa;
}

.transport-toggle button svg {
  width: 16px;
  height: 16px;
  display: block;
}

/* × Remove row button */
.remove-row-btn {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  border: none;
  background: none;
  cursor: pointer;
  color: #5f6368;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.15s;
  padding: 0;
  line-height: 1;
}

.remove-row-btn:hover {
  background: #e0e0e0;
  color: #202124;
}

/* Dropdown / Result Select */
.result-select {
  position: absolute;
  top: 40px;
  left: 0;
  width: 100%;
  display: none;
  z-index: 20;
  background: #fff;
  border: 1px solid #dadce0;
  border-radius: 4px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

/* Styles for when the select is expanded as a list */
.result-select[size] {
  padding: 4px 0;
}

.result-select option {
  padding: 8px 12px;
  cursor: pointer;
}

.result-select option:hover {
  background-color: #f1f3f4;
}

/* Controls */
.bottom-controls {
  display: flex;
  flex-direction: column;
  margin-top: 12px;
  gap: 10px;
}

.input-with-icon input {
  font-size: 16px; /* Prevent auto-zoom on iOS */
}

/* + Add Address link */
.add-address-link {
  background: none;
  border: none;
  color: #1a73e8;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 0;
  text-align: left;
  transition: color 0.2s;
}

.add-address-link:hover {
  color: #1558b0;
}

.action-group {
  display: flex;
  gap: 8px;
  align-items: center;
}

.search-button {
  flex: 1;
  height: 32px;
  padding: 0 24px;
  border: none;
  background: #1a73e8;
  color: #fff;
  border-radius: 22px;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  transition: background 0.2s;
}

.search-button:hover {
  background: #1558b0;
}

/* Outlined share/invite button */
.share-button-outline {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 18px;
  border: 1px solid #dadce0;
  background: #fff;
  color: #3c4043;
  border-radius: 22px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
}

.share-button-outline:hover {
  background: #f8f9fa;
  border-color: #bdc1c6;
}

.share-button-outline svg {
  flex-shrink: 0;
}

.search-select {
  height: 36px;
  padding: 0 8px;
  border: 1px solid #dadce0;
  border-radius: 18px;
  background: #fff;
  font-size: 13px;
}

/* Duration Info Banner */
.duration-info {
  margin: 8px 0 0;
  padding: 10px 14px;
  background: rgba(26, 115, 232, 0.08);
  border-left: 3px solid #1a73e8;
  border-radius: 0 6px 6px 0;
  font-size: 13px;
  color: #3c4043;
  line-height: 1.4;
  animation: fadeInDuration 0.4s ease;
}

@keyframes fadeInDuration {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* #endregion Address Inputs */

/* #region Sidebar Menu */
/* MARK: Sidebar Menu */
.menu-toggle {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 30px;
  height: 30px;
  border-radius: 4px;
  border: none;
  background: #fff;
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s ease;
}

.menu-toggle:hover {
  background: #f2f2f2;
}

/* Scaled down hamburger lines to fit the 30px button */
.menu-toggle span,
.menu-toggle span::before,
.menu-toggle span::after {
  content: "";
  display: block;
  width: 14px;
  height: 2px;
  background: #333;
  position: absolute;
  transition: all 0.3s;
}

/* Adjusted spacing for the smaller lines */
.menu-toggle span::before {
  top: -5px;
}

.menu-toggle span::after {
  top: 5px;
}

/* Animation adjustments for the smaller size */
.side-menu.open + .menu-toggle span { background: transparent; }
.side-menu.open + .menu-toggle span::before { top: 0; transform: rotate(45deg); }
.side-menu.open + .menu-toggle span::after { top: 0; transform: rotate(-45deg); }

/* The Side Card */
.side-menu {
  position: fixed;
  right: 0;
  top: 0;
  width: 400px;
  max-width: 85vw; /* Responsive for mobile */
  height: 100%;
  overflow-y: auto;
  box-sizing: border-box;

  /* Glassmorphism & Depth */
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: -5px 0 25px rgba(0, 0, 0, 0.1);
  border-left: 1px solid rgba(255, 255, 255, 0.5);

  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
  padding: 80px 32px 40px;
  z-index: 90;
}

.side-menu.open {
  transform: translateX(0);
}

/* Typography Improvements */
.menu-title {
  margin-top: 0;
  font-size: 26px;
  font-weight: 700;
  background: linear-gradient(45deg, #1a73e8, #8ab4f8);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 16px;
}

.menu-subtitle {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #1a73e8;
  font-weight: 700;
  margin-top: 32px;
  margin-bottom: 12px;
  display: block;
}

.menu-text {
  line-height: 1.6;
  color: #3c4043;
  font-size: 15px;
  margin-bottom: 16px;
}

/* Styled Process List (Timeline) */
.process-list {
  list-style: none;
  padding: 0;
  margin: 0;
  position: relative;
}

.process-item {
  position: relative;
  padding-left: 36px;
  margin-bottom: 16px;
  color: #3c4043;
  font-size: 14px;
  line-height: 1.5;
}

/* The vertical line */
.process-list::before {
  content: '';
  position: absolute;
  top: 8px;
  bottom: 20px;
  left: 11px;
  width: 2px;
  background: #e8f0fe;
}

/* The numbered circles */
.process-item::before {
  content: counter(step);
  counter-increment: step;
  position: absolute;
  left: 0;
  top: 0;
  width: 24px;
  height: 24px;
  background: #fff;
  border: 2px solid #1a73e8;
  border-radius: 50%;
  text-align: center;
  line-height: 21px;
  font-size: 12px;
  font-weight: bold;
  color: #1a73e8;
  z-index: 2;
}

/* Card Box for Story/Github */
.info-card {
  background: #f8f9fa;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 24px;
  border: 1px solid #eee;
}

/* Bug Report Button */
.bug-report-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #ea4335;
  color: white !important;
  padding: 10px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.2s;
  margin-top: 30px;
  margin-bottom: 10px;
  border-top: 1px solid #eee;
  padding-top: 10px;
}

.bug-report-btn:hover {
  background: #d33828;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(234, 67, 53, 0.3);
}

.bug-report-btn svg {
  flex-shrink: 0;
}

/* Footer Links */
.menu-footer {
  margin-top: 0;
  padding-top: 20px;
  border-top: 1px solid #eee;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.github-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #24292e;
  color: white !important;
  padding: 10px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  transition: opacity 0.2s;
}

.github-btn:hover {
  opacity: 0.9;
}

.legal-link {
  text-align: center;
  font-size: 12px;
  color: #70757a;
  text-decoration: none;
}

.legal-link:hover {
  text-decoration: underline;
}

/* #endregion Sidebar Menu */

/* #region Loading Overlay */
/* MARK: Loading Overlay */
.loading-overlay {
  display: none; /* Initially hidden */
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(255, 255, 255, 0.7); /* Light background */
  backdrop-filter: blur(8px); /* Blur-Effect for map */
  -webkit-backdrop-filter: blur(8px);
  z-index: 9999; /* overlay everything */
  justify-content: center;
  align-items: center;
  cursor: wait;
}

.loading-content {
  text-align: center;
  padding: 20px;
}

.loading-snake {
  width: 40px;
  height: 40px;
  border: 4px solid rgba(0, 0, 0, 0.1);
  border-top: 4px solid #1a73e8;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 20px;
}

#loading-quote {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  font-size: 1.1rem;
  color: #3c4043;
  font-weight: 500;
  margin: 0;
  min-height: 1.5em; /* avoid layout-problems */     
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* #endregion Loading Overlay */

/* #region Map Popup */
/* MARK: Map Popup */
.maplibregl-popup-content {
  padding: 0 !important; /* Reset default padding */
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
  font-family: Roboto, Arial, sans-serif;
  max-width: 320px;
}

.maplibregl-popup-close-button {
  font-size: 20px;
  color: #70757a;
  right: 8px;
  top: 6px;
  border: none;
  background: transparent;
  padding: 4px 8px;
}

.maplibregl-popup-close-button:hover {
  background: transparent;
  color: #202124;
}

.maplibregl-ctrl-top-right {
  top: 60px !important; /* Button is 44px + 12px margin + small gap */
}

/* Optional: Make the arrow slightly smaller/sharper if desired */
.maplibregl-popup-tip {
  border-top-color: #fff !important;
}


/* PopUp -Styling */
.popup-container {
  padding: 16px;
  min-width: 240px;
  max-width: 300px;
  font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

/* Header Section */
.popup-header {
  margin-bottom: 12px;
  border-bottom: 1px solid #eee;
  padding-bottom: 8px;
}

.popup-title {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: #202124;
  line-height: 1.2;
}

.popup-category {
  margin-top: 4px;
  font-size: 13px;
  color: #70757a;
  text-transform: capitalize;
}

/* Content Rows */
.popup-row {
  display: flex;
  align-items: flex-start;
  margin-bottom: 8px;
  font-size: 14px;
  color: #3c4043;
  line-height: 1.4;
}

.popup-icon {
  margin-right: 10px;
  color: #70757a;
  font-size: 16px;
  width: 16px; /* Fixed width for alignment */
  text-align: center;
}

/* Links */
.popup-link {
  color: #1a73e8;
  text-decoration: none;
  font-weight: 500;
}

.popup-link:hover {
  text-decoration: underline;
}

.popup-actions {
  margin-top: 12px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.action-btn {
  background: #e8f0fe;
  color: #1a73e8;
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 13px;
  text-decoration: none;
  font-weight: 600;
  transition-property: background-color;
  transition-duration: 0.2s;
}

.action-btn:hover {
  background: #d2e3fc;
}

/* #endregion Map Popup */

/* #region Map Footer */
/* MARK: Map Footer */
/* Map Footer Actions Container */
.map-footer-actions {
  position: absolute;
  bottom: 28px;
  right: 10px;
  z-index: 20; /* Higher than map, above some layers */
  display: flex;
  align-items: center;
  gap: 12px; /* Space between Share and Coffee */
}

/* Style for the Coffee Link Image */
.coffee-link img {
  height: 32px;
  display: block;
  transition: transform 0.2s;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  border-radius: 8px;
}

.coffee-link img:hover {
  transform: scale(1.05);
}

.share-fab {
  width: 30px; /* Standard MapLibre Control Size to match Burger Menu */
  height: 30px;
  border-radius: 4px; /* Standard MapLibre Corner Radius */
  border: none;
  background: #fff;
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.1); /* Standard MapLibre Shadow */
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #333; /* Darker to match the burger menu lines */
  z-index: 100;
  transition: background-color 0.2s ease, transform 0.2s;
}

.share-fab:hover {
  background: #f2f2f2;
  transform: scale(1.05);
  color: #1a73e8;
}

/* Ensure the SVG inside fits the smaller 30px square */
.share-fab svg {
  width: 16px;
  height: 16px;
}

#share-overlay {
  display: none;
  position: absolute;
  bottom: 80px; /* Positioned above the button */
  right: 10px;
  width: 260px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  z-index: 3000;
  padding: 16px;
  flex-direction: column;
  border: 1px solid #eee;
}

/* On mobile, move the overlay since buttons move to top-right */
@media (max-width: 480px) {
  .map-footer-actions {
    bottom: auto;
    right: auto;
    top: 12px;
    left: 12px;
    flex-direction: column;
    align-items: flex-start;
  }
}

.share-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}

.share-icon-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  font-size: 10px;
  color: #5f6368;
  gap: 4px;
}

.share-icon-link:hover {
  color: #1a73e8;
}

.share-icon-circle svg {
  display: block; /* This ensures the icon stays centered in the flex circle */
  margin: auto;
}

.share-icon-link:hover .share-icon-circle {
  background: #f1f3f4;
  transform: translateY(-2px);
  transition: all 0.2s ease;
}

.expiry-note {
  font-size: 11px;
  color: #373737;
  background: #fef7f7;
  padding: 6px;
  border-radius: 4px;
  text-align: center;
  margin-top: 10px;
  border: 1px dashed #fad2cf;
}

/* #endregion Map Footer */

/* #region Layer Toggle Panel */
/* MARK: Layer Toggle Panel */
.layer-toggle-panel {
  display: none;
  position: absolute;
  top: 68px;
  right: 50px;
  z-index: 20;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  padding: 12px 16px;
  min-width: 140px;
}

.layer-toggle-title {
  font-size: 12px;
  font-weight: 600;
  color: #5f6368;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 5px;
}

.layer-toggle-item {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 1px;
  cursor: pointer;
}

.layer-toggle-item:last-child {
  margin-bottom: 0;
}

.layer-toggle-item input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: #1a73e8;
  cursor: pointer;
}

.layer-toggle-item label {
  font-size: 14px;
  color: #3c4043;
  cursor: pointer;
  user-select: none;
}

/* Mobile: Adjust panel position */
@media (max-width: 480px) {
  .layer-toggle-panel {
    top: 60px;
    right: 10px;
  }
}

/* #endregion Layer Toggle Panel */

/* #region Isochrone Legend */
/* MARK: Isochrone Legend */
.isochrone-legend {
  display: none;
  position: absolute;
  top: 140px;
  right: 50px;
  z-index: 20;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  padding: 12px 16px;
  min-width: 140px;
}

.legend-title {
  font-size: 12px;
  font-weight: 600;
  color: #5f6368;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.legend-item:last-child {
  margin-bottom: 0;
}

.legend-color {
  width: 20px;
  height: 14px;
  border-radius: 3px;
  flex-shrink: 0;
}

.legend-label {
  font-size: 13px;
  color: #3c4043;
}

@media (max-width: 480px) {
  .isochrone-legend {
    top: 130px;
    right: 10px;
  }
}

/* #endregion Isochrone Legend */


/* #region Mobile Responsive */
/* MARK: Mobile Responsive */
@media (max-width: 480px) {
  .search-panel {
    top: auto;
    bottom: 0;
    left: 0;
    width: 100%;
    max-width: none;
    border-radius: 24px 24px 0 0;
    margin: 0;
    max-height: 80vh;
    padding-bottom: 80px; /* Add cushion at the bottom so buttons aren't covered! */
    padding-bottom: calc(80px + env(safe-area-inset-bottom));
  }

  .address-row {
    min-height: 42px;
    padding: 4px 8px;
    gap: 4px;
  }

  .input-with-icon input {
    height: 32px;
  }

  /* Stack controls on mobile */
  .bottom-controls {
    gap: 10px;
  }

  .action-group {
    width: 100%;
  }

  .search-button {
    flex: 1;
  }

  .menu-toggle {
    top: 12px;
  }
}

/* Handle is hidden on Desktop */
.mobile-handle { display: none; }

/* Mobile Styles */
@media (max-width: 480px) {

  .mobile-handle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 24px;
    margin-bottom: 8px;
    cursor: pointer;
    position: relative;
  }

  /* The Chevron Arrow */
  .mobile-handle::before {
    content: '';
    width: 10px;
    height: 10px;
    border-right: 2px solid #5f6368; /* Chevron Color */
    border-bottom: 2px solid #5f6368;
    transform: rotate(45deg); /* Points DOWN by default (to close) */
    transition: transform 0.3s;
  }

  /* Increase touch target */
  .mobile-handle::after {
    content: "";
    position: absolute;
    top: -10px;
    left: 0;
    right: 0;
    bottom: -10px;
  }

  /* Animation Styles */
  .search-panel {
    transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    will-change: transform;
  }

  /* Collapsed State: Move down */
  .search-panel.is-collapsed {
    /* 100% = Move completely off screen
      - 60px = Show 60px of the handle/header
      - env(...) = Add extra height for iPhone Home Bar / Android Nav 
   */
    transform: translateY(calc(100% - 100px - env(safe-area-inset-bottom)));
  }

  /* Rotate Chevron when collapsed (Points UP to open) */
  .search-panel.is-collapsed .mobile-handle::before {
    transform: rotate(225deg);
    margin-top: 5px; /* Visual adjustment */
  }
}

/* #endregion Mobile Responsive */

/* #region Multi-Session Styles */
/* MARK: Multi-Session Styles */

/* Invite Button */
.invite-button {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 16px;
  border: 1px solid #1a73e8;
  background: #fff;
  color: #1a73e8;
  border-radius: 18px;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
}

.invite-button:hover {
  background: #e8f0fe;
}

.invite-button svg {
  flex-shrink: 0;
}

/* Invite Modal */
.invite-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 5000;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.invite-modal.visible {
  display: flex;
}

.invite-modal-content {
  background: #fff;
  border-radius: 16px;
  padding: 24px;
  max-width: 400px;
  width: 100%;
  position: relative;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.invite-modal-content h3 {
  margin: 0 0 8px 0;
  font-size: 20px;
  color: #202124;
}

.invite-modal-content p {
  margin: 0 0 16px 0;
  font-size: 14px;
  color: #5f6368;
  line-height: 1.5;
}

.invite-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  border: none;
  background: none;
  font-size: 24px;
  color: #5f6368;
  cursor: pointer;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.invite-modal-close:hover {
  background: #f1f3f4;
}

.invite-link-box {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.invite-link-box input {
  flex: 1;
  padding: 10px 12px;
  border: 1px solid #dadce0;
  border-radius: 8px;
  font-size: 13px;
  background: #f8f9fa;
  color: #3c4043;
}

.invite-copy-btn {
  padding: 10px 16px;
  border: none;
  background: #1a73e8;
  color: #fff;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.invite-copy-btn:hover {
  background: #1557b0;
}

.invite-share-buttons {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
}

.invite-share-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: opacity 0.2s;
}

.invite-share-btn:hover {
  opacity: 0.9;
}

.invite-wa {
  background: #25D366;
  color: #fff;
}

.invite-native {
  background: #f1f3f4;
  color: #3c4043;
}

.invite-participant-count {
  text-align: center;
  font-size: 13px;
  color: #5f6368;
  padding: 12px;
  background: #f8f9fa;
  border-radius: 8px;
}

.invite-participant-count span {
  font-weight: 700;
  color: #1a73e8;
}

/* Participant List */
.participant-list {
  margin: 12px 0;
  padding: 12px;
  background: #f8f9fa;
  border-radius: 12px;
}

.participant-list-title {
  font-size: 12px;
  font-weight: 600;
  color: #5f6368;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.participant-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid #eee;
}

.participant-item:last-child {
  border-bottom: none;
}

.participant-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #e8f0fe;
  color: #1a73e8;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
}

.participant-name {
  flex: 1;
  font-size: 14px;
  color: #202124;
}

.participant-status {
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 10px;
  font-weight: 500;
}

.participant-status.ready {
  background: #e6f4ea;
  color: #137333;
}

.participant-status.waiting {
  background: #fef7e0;
  color: #b06000;
}

/* Guest View */
.guest-view {
  padding: 8px 0;
}

.guest-welcome {
  text-align: center;
  margin-bottom: 16px;
}

.guest-welcome h3 {
  margin: 0 0 8px 0;
  font-size: 18px;
  color: #202124;
}

.guest-welcome p {
  margin: 0;
  font-size: 14px;
  color: #5f6368;
}

.guest-nickname-row {
  margin-bottom: 12px;
}

.guest-nickname-row input {
  width: 100%;
  height: 42px;
  padding: 0 14px;
  border: 2px solid #1a73e8;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 500;
}

.guest-status {
  text-align: center;
  padding: 20px;
  margin-top: 12px;
}

.guest-status-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 12px;
  background: #e6f4ea;
  color: #137333;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
}

.guest-status p {
  margin: 0;
  font-size: 14px;
  color: #5f6368;
}

/* Kicked state for guest */
.guest-status.kicked .guest-status-icon {
  background: #fce8e6;
  color: #c5221f;
}

.guest-status.kicked .guest-status-icon.kicked {
  background: #fce8e6;
  color: #c5221f;
}

/* Participant remove button */
.participant-remove-btn {
  background: none;
  border: none;
  color: #ea4335;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 50%;
  font-size: 14px;
  opacity: 0.6;
  transition: all 0.2s;
  margin-left: auto;
}

.participant-remove-btn:hover {
  opacity: 1;
  background: #fce8e6;
}

/* Leave Invite Button */
.leave-invite-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  height: 36px;
  padding: 0 14px;
  border: 1px solid #ea4335;
  background: #fff;
  color: #ea4335;
  border-radius: 18px;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
}

.leave-invite-btn:hover {
  background: #fce8e6;
}

/* #endregion Multi-Session Styles */

/* #region Landing Page */
/* MARK: Landing Page */
.landing-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow-y: auto;
}

.landing-content {
  text-align: center;
  padding: 40px 24px;
  max-width: 520px;
  width: 100%;
  animation: landingFadeIn 0.6s ease-out;
}

@keyframes landingFadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.landing-header {
  margin-bottom: 36px;
}

.landing-title {
  font-size: 42px;
  font-weight: 800;
  color: #fff;
  margin: 0 0 8px 0;
  letter-spacing: -1px;
  text-shadow: 0 2px 20px rgba(26, 115, 232, 0.3);
}

.landing-subtitle {
  font-size: 18px;
  color: #94a3b8;
  margin: 0;
  font-weight: 400;
}

.landing-cities {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 28px;
}

.city-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 20px 12px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.25s ease;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.city-card:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(26, 115, 232, 0.5);
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(26, 115, 232, 0.2);
}

.city-icon {
  font-size: 32px;
  line-height: 1;
}

.city-name {
  font-size: 15px;
  font-weight: 600;
  color: #e2e8f0;
}

.city-card:hover .city-name {
  color: #fff;
}

/* 5 cards: 3 top row, 2 bottom row — grid auto-wraps */

.landing-gps-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.05);
  color: #94a3b8;
  border-radius: 24px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.landing-gps-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border-color: rgba(26, 115, 232, 0.5);
}

.landing-gps-btn svg {
  width: 18px;
  height: 18px;
}

@media (max-width: 480px) {
  .landing-title {
    font-size: 32px;
  }

  .landing-subtitle {
    font-size: 16px;
  }

  .landing-cities {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .city-card {
    padding: 16px 10px;
  }

  .city-icon {
    font-size: 28px;
  }
}

/* #endregion Landing Page */

/* #region Region Selector */
/* MARK: Region Selector */
.region-selector {
  padding: 0 0 6px 0;
}

.region-select {
  width: auto;
  height: auto;
  padding: 4px 24px 4px 2px;
  border: none;
  border-radius: 0;
  background: transparent;
  font-size: 22px;
  font-weight: 700;
  color: #202124;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23202124' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 2px center;
  outline: none;
  transition: color 0.2s;
}

.region-select:hover {
  color: #1a73e8;
}

.region-select:focus {
  color: #1a73e8;
}

/* #endregion Region Selector */
