
:root {
  --bg-color: #f1ede3;
  --sidebar-bg: #f3eadd;
  --accent-color: #1b5e4a;
  --text-color: #444;
  --menu-text: #676a63;
  --active-bg: #e2dbc9;
}

.popup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.2s ease;
}

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

.popup-box {
  background: var(--sidebar-bg);
  border-radius: 14px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.22);
  padding: 32px 36px 24px;
  min-width: 300px;
  max-width: 420px;
  width: 90%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  animation: fadeIn 0.22s ease;
}

.popup-icon {
  width: 52px;
  height: 52px;
  background: #e8f5f1;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.popup-icon svg {
  width: 28px;
  height: 28px;
  stroke: var(--accent-color);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.popup-title {
  font-family: "Merriweather Sans", sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: #333;
  text-align: center;
}

.popup-message {
  font-family: "Merriweather Sans", sans-serif;
  font-size: 15px;
  color: var(--text-color);
  text-align: center;
  line-height: 1.55;
}

.popup-btn {
  margin-top: 6px;
  background: var(--accent-color);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 10px 36px;
  font-family: "Merriweather Sans", sans-serif;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: filter 0.2s, transform 0.2s;
}

.popup-btn:hover {
  filter: brightness(1.12);
  transform: translateY(-1px);
}


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

body, html {
  height: 100%;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background-color: var(--bg-color);
  overflow-x: hidden;
}


.main-container {
  display: flex;
  min-height: 100vh;
  width: 100%;
  background-image: url("img/background.jpg");
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}

/* ── Sidebar ── */
.sidebar {
  width: 373px;
  background: var(--sidebar-bg);
  box-shadow: 4px 0 10px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  z-index: 100;
  position: relative;
  flex-shrink: 0;
}

.logo {
  position: absolute;
  left: 43px;
  top: 36px;
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}

.logo img {
  width: 92px;
  height: 83px;
  object-fit: contain;
}

.logo span {
  font-family: "Noto Sans", sans-serif;
  font-size: 26px;
  font-weight: 700;
  color: #086d50;
}

.menu {
  display: flex;
  flex-direction: column;
  margin-top: 170px;
}

.menu-icon {
  width: 32px;
  height: 32px;
  object-fit: contain;
  flex-shrink: 0;
}

.menu-item {
  display: flex;
  align-items: center;
  gap: 15px;
  width: 100%;
  height: 80px;
  padding-left: 43px;
  text-decoration: none;
  transition: background-color 0.3s ease, border-radius 0.3s ease;
  margin-bottom: 4px;
  font-family: "Merriweather Sans", sans-serif;
  font-size: 26px;
  font-weight: 700;
  color: var(--menu-text);
}

.menu-item:hover,
.menu-item.active {
  background-color: var(--active-bg);
  color: var(--menu-text);
  border-radius: 12px;
  width: calc(100% - 20px);
  margin-left: 10px;
}

.content {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  padding: 32px 40px 40px;
  gap: 20px;
  position: relative;
  z-index: 10;
}

.controls-bar {
  display: flex;
  align-items: center;
  gap: 12px;
}

.building-select {
  appearance: none;
  -webkit-appearance: none;
  background-color: #f9f7f2;
  border: 1px solid #ccc;
  border-radius: 8px;
  padding: 0 36px 0 16px;
  height: 44px;
  min-width: 160px;
  font-family: "Merriweather Sans", sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: #444;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23444' stroke-width='1.8' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.08);
  outline: none;
  transition: border-color 0.2s;
}

.building-select:focus {
  border-color: var(--accent-color);
}

.floor-input {
  flex: 1;
  max-width: 320px;
  height: 44px;
  border: 1px solid #ccc;
  border-radius: 8px;
  padding: 0 16px;
  font-family: "Merriweather Sans", sans-serif;
  font-size: 15px;
  color: #444;
  background-color: #f9f7f2;
  box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.08);
  outline: none;
  transition: border-color 0.2s;
}

.floor-input::placeholder {
  color: #aaa;
  font-weight: 400;
}

.floor-input:focus {
  border-color: var(--accent-color);
}

.search-btn {
  width: 44px;
  height: 44px;
  background-color: var(--accent-color);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: filter 0.2s, transform 0.2s;
  flex-shrink: 0;
}

.search-btn:hover {
  filter: brightness(1.15);
  transform: translateY(-1px);
}

.search-icon-img {
  width: 22px;
  height: 22px;
  object-fit: contain;
}


.map-wrapper {
  flex-grow: 1;
  background-color: rgba(249, 247, 242, 0.88);
  border: 1px solid #d1cfc7;
  border-radius: 14px;
  box-shadow: 4px 4px 12px rgba(0, 0, 0, 0.12);
  overflow: hidden;
  position: relative;
  min-height: 420px;
  display: flex;
  align-items: center;
  justify-content: center;
}


.map-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  opacity: 0.5;
}

.placeholder-icon {
  width: 72px;
  height: 72px;
}

.map-placeholder p {
  font-family: "Merriweather Sans", sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: #888;
  text-align: center;
  line-height: 1.5;
}


.map-photo-container {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 5px;
  gap: 6px;
  position: relative;
}

.map-photo {
  width: calc(100% - 10px);
  height: calc(100% - 10px);
  object-fit: fill;
  border-radius: 10px;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.14);
  animation: fadeIn 0.35s ease;
  background-color: #fff;
}

@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.97); }
  to   { opacity: 1; transform: scale(1); }
}

.map-photo-caption {
  font-family: "Merriweather Sans", sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: #555;
  letter-spacing: 0.02em;
}


.not-found-msg {
  position: absolute;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  background: #c0392b;
  color: #fff;
  font-family: "Merriweather Sans", sans-serif;
  font-size: 14px;
  font-weight: 700;
  padding: 8px 20px;
  border-radius: 8px;
  box-shadow: 2px 2px 6px rgba(0, 0, 0, 0.2);
  white-space: nowrap;
  animation: fadeIn 0.2s ease;
}


.hidden {
  display: none !important;
}


@media (max-width: 1200px) {
  .sidebar { width: 320px; }
  .menu-item { font-size: 22px; padding-left: 30px; }
}

@media (max-width: 768px) {
  .main-container { flex-direction: column; }
  .sidebar { width: 100%; height: auto; position: static; }
  .logo { position: static; padding: 20px; justify-content: center; }

  .menu {
    margin-top: 0;
    flex-direction: row;
    overflow-x: auto;
    padding: 10px;
    gap: 10px;
  }

  .menu-item {
    height: 60px;
    padding: 0 15px;
    font-size: 18px;
    width: auto;
    margin-left: 0;
  }

  .menu-icon { width: 24px; height: 24px; }

  .content { padding: 16px; gap: 14px; }
  .controls-bar { flex-wrap: wrap; }
  .floor-input { max-width: 100%; }
  .map-wrapper { min-height: 320px; }
}
.room-marker {
  position: absolute;
  width: 38px;
  height: 38px;
  background: #8a8a8a;
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  box-shadow: 0 3px 8px rgba(0,0,0,0.3);
  transition: all 0.25s ease;
  z-index: 10;
  cursor: pointer;
  user-select: none;
}

.room-marker:hover {
  transform: scale(1.2);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.25);
}

.marker-number {
  z-index: 2;
}

.marker-tooltip {
  position: absolute;
  top: -45px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0,0,0,0.85);
  color: white;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 13px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s ease;
  z-index: 20;
}

.room-marker:hover .marker-tooltip {
  opacity: 1;
  visibility: visible;
  top: -50px;
}

.map-photo-container {
  position: relative;
}
