/* ===== RESET & BASE ===== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  width: 100%;
  height: 100%;
  font-family: 'DM Sans', sans-serif;
  background: #fff;
  color: #333;
  overflow: hidden;
}

/* ===== LAYOUT ===== */
.site-wrapper {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100vh;
}

/* ===== HEADER ===== */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  border-bottom: 1px solid #e5e5e5;
  background: #fff;
  flex-shrink: 0;
  min-height: 56px;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.location-name {
  font-size: 16px;
  font-weight: 700;
  color: #1a1a1a;
  white-space: nowrap;
}

.page-title {
  font-size: 16px;
  font-weight: 700;
  color: #666;
  white-space: nowrap;
}

.page-subtitle {
  font-size: 13px;
  font-weight: 400;
  color: #999;
  white-space: nowrap;
}

.header-separator {
  width: 1px;
  height: 20px;
  background: #ddd;
  flex-shrink: 0;
}

/* ===== NAVIGATION BUTTONS ===== */
.header-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.nav-btn {
  display: inline-block;
  padding: 7px 16px;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: #444;
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 4px;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s;
  white-space: nowrap;
}

.nav-btn:hover {
  background: #f5f5f5;
  border-color: #aaa;
  color: #222;
}

.nav-btn.active {
  background: #f0f0f0;
  border-color: #999;
  color: #111;
  font-weight: 600;
}

/* ===== FLOOR SELECTOR ===== */
.floor-selector-container {
  display: inline-flex;
  align-items: center;
}

.floor-selector-label {
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 700;
  color: #777;
  margin-left: 16px;
  margin-right: 4px;
  white-space: nowrap;
}

.floor-selector-wrapper {
  position: relative;
  display: inline-block;
}

.floor-selector-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: #333;
  background-color: #f5f5f5;
  border: 1px solid #ddd;
  border-radius: 4px;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.2s, border-color 0.2s;
  white-space: nowrap;
  min-width: 180px;
  justify-content: space-between;
}

.floor-selector-toggle:hover {
  background-color: #eee;
  border-color: #ccc;
}

.floor-selector-toggle.open {
  border-color: #999;
  background-color: #eee;
}

.floor-selector-toggle .chevron {
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 5px solid #666;
  transition: transform 0.2s;
  flex-shrink: 0;
}

.floor-selector-toggle.open .chevron {
  transform: rotate(180deg);
}

.floor-selector-menu {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  min-width: 100%;
  max-height: 280px;
  overflow-y: auto;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 4px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
  z-index: 1000;
  padding: 4px 0;
}

.floor-selector-menu.open {
  display: block;
}

.floor-selector-item {
  padding: 8px 14px;
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  color: #333;
  cursor: pointer;
  transition: background-color 0.15s;
  white-space: nowrap;
}

.floor-selector-item:hover {
  background-color: #f0f0f0;
}

.floor-selector-item.active {
  background-color: #e8e8e8;
  font-weight: 600;
}

.floor-selector-toggle.loading {
  opacity: 0.6;
  pointer-events: none;
}

.floor-selector-toggle.loading::after {
  content: '';
  width: 14px;
  height: 14px;
  border: 2px solid #ccc;
  border-top-color: #666;
  border-radius: 50%;
  animation: floor-spin 0.6s linear infinite;
  margin-left: 4px;
}

@keyframes floor-spin {
  to { transform: rotate(360deg); }
}

/* ===== PLAN AREA ===== */
.plan-area {
  flex: 1;
  position: relative;
  overflow: hidden;
}

/* ===== FOOTER ===== */
.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 20px;
  border-top: 1px solid #e5e5e5;
  background: #fff;
  flex-shrink: 0;
}

.footer-text {
  font-size: 11px;
  color: #aaa;
}

.footer-text a {
  color: #aaa;
  text-decoration: none;
}

.footer-text a:hover {
  color: #666;
}
