﻿/* ============================================================
   Church Interactive Map â€” Stylesheet
   Brand colors matched to bscofc.link
   ============================================================ */

/* ---------- Reset & Base ---------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --navy:   #0b3d91;
  --navy-dk: #07265a;
  --gold:   #fbbf24;
  --white:  #ffffff;
  --light:  #f7faff;
  --shadow: rgba(0,0,0,0.18);
  --radius: 14px;
}

html, body {
  height: 100%;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--light);
  color: #111827;
  overflow-x: hidden;
}

/* ---------- Header ---------- */
.site-header {
  background: var(--navy);
  color: var(--white);
  padding: 10px 16px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.30);
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 3px solid var(--gold);
}

.header-content {
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 14px;
}

/* Church logo image */
.header-logo,
.church-logo {
  height: 52px;
  width: auto;
  display: block;
  flex-shrink: 0;
  background: #ffffff;
  padding: 4px 6px;
  border-radius: 8px;
}

.header-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.church-name {
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.2;
}

.church-tagline {
  font-size: 0.78rem;
  color: var(--gold);
  font-weight: 600;
  margin-top: 1px;
}

.church-info {
  font-size: 0.75rem;
  opacity: 0.85;
  margin-top: 1px;
}

/* ---------- Map Container ---------- */
.map-container {
  max-width: 960px;
  margin: 14px auto;
  padding: 0 12px 24px;
}

#church-map {
  width: 100%;
  height: auto;
  display: block;
  border: 3px solid #37474f;
  border-radius: 10px;
  background: #fafafa;
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}

/* ---------- SVG Room Styles ---------- */

.room {
  cursor: pointer;
}

.room .room-rect {
  transition: filter 0.18s ease;
}
.room:hover .room-rect,
.room:focus .room-rect {
  filter: brightness(0.88);
}
.room:active .room-rect {
  filter: brightness(0.75);
}

/* Facility/common rooms get muted hover */
.room[data-type="facility"] .room-rect,
.room[data-type="common"] .room-rect {
  cursor: default;
}
.room[data-type="facility"]:hover .room-rect,
.room[data-type="common"]:hover .room-rect {
  filter: brightness(0.93);
}

/* Room text labels (SVG px units, 1400-wide viewBox) */
.room-label-main {
  font-size: 28px;
  font-weight: 700;
  text-anchor: middle;
  dominant-baseline: middle;
  fill: #1f2937;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  pointer-events: none;
  user-select: none;
}

.room-label-sub {
  font-size: 20px;
  font-weight: 400;
  text-anchor: middle;
  dominant-baseline: middle;
  fill: #4b5563;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  pointer-events: none;
  user-select: none;
}

.room-label-small {
  font-size: 17px;
  font-weight: 400;
  text-anchor: middle;
  dominant-baseline: middle;
  fill: #6b7280;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  pointer-events: none;
  user-select: none;
}

/* Large sanctuary cross watermark */
.sanctuary-icon {
  font-size: 72px;
  text-anchor: middle;
  dominant-baseline: middle;
  fill: #0b3d91;
  opacity: 0.15;
  pointer-events: none;
  user-select: none;
}

/* Compass */
.compass-label {
  font-size: 11px;
  font-weight: 700;
  text-anchor: middle;
  dominant-baseline: middle;
  font-family: system-ui, -apple-system, sans-serif;
  pointer-events: none;
}

/* Legend */
.legend-text {
  font-size: 18px;
  dominant-baseline: middle;
  fill: #374151;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ---------- Popup Overlay ---------- */
.popup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 100;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

.popup-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* ---------- Popup Card ---------- */
.popup-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 28px 24px 24px;
  max-width: 380px;
  width: 100%;
  position: relative;
  box-shadow: 0 12px 40px rgba(0,0,0,0.25);
  border-top: 4px solid var(--navy);
  transform: scale(0.93) translateY(10px);
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.22s ease;
  opacity: 0;
  text-align: center;
}

.popup-overlay.active .popup-card {
  transform: scale(1) translateY(0);
  opacity: 1;
}

/* Close button */
.popup-close {
  position: absolute;
  top: 12px;
  right: 14px;
  background: #f3f4f6;
  border: none;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  color: #6b7280;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, color 0.15s;
}
.popup-close:hover {
  background: #e5e7eb;
  color: var(--navy);
}

/* Room name badge */
.popup-room-badge {
  display: inline-block;
  background: #e8edf8;
  color: var(--navy);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 16px;
}

/* Avatar circle */
.popup-avatar {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 14px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.18);
  font-size: 2rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.02em;
  transition: background-color 0.2s;
}

/* Teacher name */
.popup-teacher-name {
  font-size: 1.18rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 8px;
  line-height: 1.3;
}

/* Subject badge */
.popup-subject {
  display: inline-block;
  background: linear-gradient(135deg, var(--navy), #1a56c4);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 5px 14px;
  border-radius: 20px;
  margin-bottom: 14px;
}

/* Description */
.popup-description {
  font-size: 0.88rem;
  color: #4b5563;
  line-height: 1.6;
  margin-bottom: 18px;
}

/* Footer location line */
.popup-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 0.78rem;
  color: #9ca3af;
  border-top: 1px solid #f3f4f6;
  padding-top: 14px;
}

.popup-footer-icon {
  font-size: 0.9rem;
}

/* ---------- Toast Notification ---------- */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: #1f2937;
  color: #fff;
  padding: 10px 22px;
  border-radius: 24px;
  font-size: 0.85rem;
  font-weight: 500;
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
  z-index: 200;
  opacity: 0;
  transition: opacity 0.22s ease, transform 0.22s ease;
  white-space: nowrap;
  pointer-events: none;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ---------- Responsive ---------- */
@media (max-width: 480px) {
  .header-logo,
  .church-logo {
    height: 40px;
  }
  .church-name {
    font-size: 1rem;
  }
  .church-tagline {
    font-size: 0.7rem;
  }
  .church-info {
    display: none;
  }
  .map-container {
    padding: 0 6px 16px;
    margin: 10px auto;
  }
  .popup-card {
    padding: 22px 18px 20px;
    border-radius: 12px;
  }
  .popup-avatar {
    width: 72px;
    height: 72px;
    font-size: 1.6rem;
  }
  .popup-teacher-name {
    font-size: 1.05rem;
  }
}

@media (max-width: 360px) {
  .popup-overlay {
    padding: 12px;
  }
}



