/* Mobile Drawer Styles */

/* Hide mobile drawer on desktop by default */
.mobile-top-bar { display: none !important; }
.mobile-drawer { display: none !important; }

@media (max-width: 992px) {
  .sidebar { display: none !important; }
  .content-wrapper { margin-left: 0 !important; }

  body.has-mobile-top-bar { padding-top: 60px; }

  .mobile-top-bar {
    display: flex !important;
    position: fixed; top: 0; left: 0; right: 0; height: 56px; background: var(--sidebar-bg); z-index: 1100;
    border-bottom: 1px solid rgba(255,255,255,0.1); align-items: center; padding: 0 12px;
    box-shadow: 0 1px 6px rgba(0,0,0,0.2);
    justify-content: space-between;
  }
  .mobile-menu-button {
    position: relative; z-index: 1120;
    width: 40px; height: 40px; background: transparent; border: none; border-radius: 6px;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    flex-shrink: 0;
  }
  .mobile-menu-button .mm-bar { width: 22px; height: 2px; background:#fff; margin: 3px 0; border-radius: 2px; }
  
  .mobile-top-bar-event-name {
    flex: 1;
    color: #fff;
    font-size: 1.5rem;
    font-weight: 600;
    text-align: center;
    padding: 0 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .mobile-exhibitors-button {
    position: relative; z-index: 1120;
    width: 40px; height: 40px; background: transparent; border: none; border-radius: 6px;
    display: none; align-items: center; justify-content: center;
    color: #fff; flex-shrink: 0;
  }
  .mobile-exhibitors-button[data-map-page="true"] {
    display: flex;
  }
  .mobile-exhibitors-button:active {
    background: rgba(255,255,255,0.1);
  }

  .mobile-sidebar-toggle {
    width: 40px; height: 32px; background: transparent; border: none; border-radius: 6px;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    margin-left: 8px; color: #fff; z-index: 1120;
  }

  .mobile-sidebar-toggle .hamburger-icon span {
    display: block; width: 20px; height: 2px; background: #fff; margin: 3px 0; border-radius: 2px;
  }

  .mobile-drawer { 
    display: none !important;
    position: fixed; inset: 0; z-index: 1099;
  }
  .mobile-drawer[aria-hidden="false"] { display: block !important; }
  .mobile-drawer__backdrop { position: absolute; inset: 0; background: rgba(0,0,0,0.35); }
  .mobile-drawer__panel { position: absolute; top: 56px; height: calc(100% - 56px); left: 0; width: min(96vw, 640px); background: var(--sidebar-bg); box-shadow: 2px 0 20px rgba(0,0,0,0.2);
    display: flex; flex-direction: column; transform: translateX(-100%); transition: transform 220ms ease; }
  .mobile-drawer[aria-hidden="false"] .mobile-drawer__panel { transform: translateX(0); }

  .mobile-drawer__header { display:flex; align-items:center; justify-content: space-between; padding: 14px 16px; border-bottom:1px solid rgba(255,255,255,0.1); }
  .mobile-drawer__fair-name { font-weight: 600; font-size: 16px; color:#fff; }
  .mobile-drawer__fair-status { font-size: 12px; color:rgba(255,255,255,0.7); }
  .mobile-drawer__close { background:none; border:0; font-size: 28px; line-height: 1; color:#fff; }

  .mobile-drawer__search { padding: 12px 16px; border-bottom:1px solid rgba(255,255,255,0.1); }
  #mobile-menu-search { width: 100%; padding: 10px 12px; border:1px solid rgba(255,255,255,0.2); border-radius: 6px; font-size: 14px; background: rgba(255,255,255,0.1); color: #fff; }

  .mobile-drawer__nav { overflow-y: auto; padding: 8px 0; }
  .mobile-group { border-bottom: 1px solid rgba(255,255,255,0.1); }
  .mobile-group__toggle { width:100%; background:none; border:0; display:flex; align-items:center; justify-content: space-between; padding: 12px 16px; font-weight:600; font-size:15px; color:#fff; }
  .mobile-group__list { list-style:none; margin:0; padding: 0 0 8px 0; display:none; }
  .mobile-group__list .mobile-link a { display:block; padding: 10px 22px; color:rgba(255,255,255,0.9); text-decoration:none; }
  .mobile-group__list .mobile-link a:hover { background:rgba(255,255,255,0.1); }
  .mobile-group__toggle[aria-expanded="true"] + .mobile-group__list { display:block; }

  /* Inline icon before text */
  .mobile-icon { display:inline-flex; width:18px; height:12px; margin-right:8px; vertical-align:middle; }
  .mobile-icon svg { width:100%; height:100%; display:block; }

  /* Subgroup styling */
  .mobile-subgroup { padding: 4px 0; }
  .mobile-subgroup__toggle { width:100%; background:none; border:0; display:flex; align-items:center; justify-content: space-between; padding: 8px 22px; font-weight:600; font-size:14px; color:#444; }
  .mobile-subgroup__list { list-style:none; margin:0; padding: 0 0 6px 0; display:none; }
  .mobile-subgroup__list .mobile-link a { padding: 8px 32px; color:#222; text-decoration:none; }
  .mobile-subgroup__list .mobile-link a:hover { background:#f4f4f4; }
  .mobile-subgroup__toggle[aria-expanded="true"] + .mobile-subgroup__list { display:block; }

  /* Single-link groups render as direct links */
  .mobile-group--single .mobile-single {
    display:block;
    padding: 12px 16px;
    font-weight:600;
    font-size:15px;
    color:#fff;
    text-decoration:none;
  }
  .mobile-group--single .mobile-single:hover { background:#f7f7f7; }
}

/* Create Marker Menu - Mobile Modal */
.create-marker-menu {
  position: fixed !important;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  z-index: 1200;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.create-marker-menu.show {
  opacity: 1;
  pointer-events: auto;
}

.create-marker-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1;
}

.create-marker-content {
  position: relative;
  background: white;
  border-radius: 12px;
  padding: 24px 20px;
  max-width: 300px;
  width: 90%;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  text-align: center;
  z-index: 2;
  margin: auto;
}

.create-marker-content h3 {
  margin: 0 0 8px 0;
  font-size: 18px;
  font-weight: 600;
  color: #333;
}

.create-marker-content p {
  margin: 0 0 20px 0;
  font-size: 14px;
  color: #666;
}

.create-marker-btn {
  display: block;
  width: 100%;
  padding: 12px 16px;
  margin-bottom: 10px;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  background: var(--primary-btn-bg, #007bff);
  color: white;
}

.create-marker-btn:not(.cancel):active {
  background: var(--primary-btn-hover, #0056b3);
  transform: scale(0.98);
}

.create-marker-btn.cancel {
  background: #e9ecef;
  color: #333;
}

.create-marker-btn.cancel:active {
  background: #d3d6da;
}

/* Edit Position Menu - Mobile Modal */
.edit-position-menu {
  position: fixed !important;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  z-index: 1200;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.edit-position-menu.show {
  opacity: 1;
  pointer-events: auto;
}

.edit-menu-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1;
}

.edit-menu-content {
  position: relative;
  background: white;
  border-radius: 12px;
  padding: 24px 20px;
  max-width: 320px;
  width: 90%;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  z-index: 2;
  margin: auto;
}

.edit-menu-content h3 {
  margin: 0 0 16px 0;
  font-size: 18px;
  font-weight: 600;
  color: #333;
  text-align: center;
}

.edit-menu-items {
  margin-bottom: 12px;
}

.edit-menu-item {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 14px 16px;
  margin-bottom: 8px;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  background: white;
  color: var(--primary-btn-bg, #007bff);
  border: 1.5px solid var(--primary-btn-bg, #007bff);
  text-align: left;
}

.edit-menu-item:active {
  background: var(--primary-btn-bg, #007bff);
  color: white;
  transform: scale(0.98);
}

.edit-menu-item.cancel {
  background: #e9ecef;
  color: #333;
  border-color: #e9ecef;
}

.edit-menu-item.cancel:active {
  background: #d3d6da;
  border-color: #d3d6da;
}

.edit-menu-label {
  flex: 1;
}
