/* styles.css
   Beginner notes:
   - Most visual changes are in this file.
   - Party colours and TD information are in data.js.
   - The actual seats are created in script.js using the coordinates in data.js.
*/

:root {
  --page-bg: #f4f6f8;
  --card-bg: #ffffff;
  --text: #17202a;
  --muted: #667085;
  --border: #d9dee7;
  --shadow: 0 18px 45px rgba(16, 24, 40, 0.08);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background: var(--page-bg);
  color: var(--text);
}

.site-header {
  background: linear-gradient(135deg, #0f172a, #1f3a5f);
  color: white;
  padding: 48px 7vw;
}

.compact-header {
  padding-top: 32px;
  padding-bottom: 32px;
}

.site-header h1 {
  margin: 0;
  font-size: clamp(2rem, 5vw, 4.5rem);
  letter-spacing: -0.04em;
}

.eyebrow {
  margin: 0 0 8px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: #b9d9ff;
  font-size: 0.78rem;
  font-weight: 700;
}

.intro {
  max-width: 760px;
  line-height: 1.65;
  margin: 16px 0 0;
  color: #e5edf7;
}

.page-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 28px auto 64px;
}

.controls-card,
.legend-card,
.map-card,
.profile-card,
.info-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.controls-card {
  display: grid;
  grid-template-columns: minmax(180px, 260px) 1fr auto;
  gap: 16px;
  align-items: end;
  padding: 20px;
  margin-bottom: 20px;
}

.control-group label {
  display: block;
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 8px;
}

select,
input,
button {
  width: 100%;
  min-height: 46px;
  border-radius: 12px;
  border: 1px solid var(--border);
  font: inherit;
}

select,
input {
  padding: 0 14px;
  background: white;
}

.secondary-button {
  padding: 0 18px;
  border: 0;
  background: #0f172a;
  color: white;
  font-weight: 700;
  cursor: pointer;
}

.secondary-button:hover {
  background: #24334d;
}

.legend-card {
  padding: 20px;
  margin-bottom: 20px;
}

.legend-card h2,
.map-heading h2 {
  margin: 0 0 12px;
}

.legend-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(185px, 1fr));
  gap: 10px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fbfcfe;
  cursor: pointer;
  text-align: left;
}

.legend-item:hover {
  background: #f3f6fa;
}

.legend-swatch {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, 0.15);
  flex: 0 0 18px;
}

.map-card {
  padding: 18px;
  overflow-x: visible;
}

.map-heading {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: end;
  margin-bottom: 16px;
}

.map-heading p {
  margin: 0;
  color: var(--muted);
}

.seating-map {
  position: relative;
  width: min(100%, 1126px);
  margin: 0 auto;
  aspect-ratio: 1126 / 908;
  background: white;
  border-radius: 18px;
  overflow: visible;
  border: 1px solid #ecf0f5;
}

.plan-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0.08;
  user-select: none;
  pointer-events: none;
}

.seat-layer {
  position: absolute;
  inset: 0;
}

.seat {
  --seat-size: 3.38%;
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: var(--seat-size);
  aspect-ratio: 1 / 1;
  transform: translate(-50%, -50%);
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.85);
  background: var(--party-colour);
  cursor: pointer;
  transition: opacity 160ms ease, transform 160ms ease, box-shadow 160ms ease, filter 160ms ease;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.11);
}

.seat:hover,
.seat:focus-visible {
  transform: translate(-50%, -50%) scale(1.22);
  z-index: 30;
  outline: 3px solid rgba(15, 23, 42, 0.85);
  outline-offset: 2px;
}

.seat.dimmed {
  opacity: 0.5;
  filter: grayscale(30%);
}

.seat.active {
  z-index: 35;
  outline: 4px solid #111827;
  outline-offset: 3px;
}

.tooltip {
  position: absolute;
  left: 50%;
  bottom: 135%;
  transform: translateX(-50%) translateY(8px);
  width: 300px;
  padding: 18px;
  background: #111827;
  color: white;
  border-radius: 14px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.28);
  opacity: 0;
  pointer-events: none;
  transition: opacity 160ms ease, transform 160ms ease;
  text-align: left;
}

.tooltip::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 8px solid transparent;
  border-top-color: #111827;
}

.seat:hover .tooltip,
.seat:focus-visible .tooltip {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.tooltip-header {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 8px;
}

.tooltip img {
  width: 85px;
  height: 85px;
  border-radius: 50%;
  object-fit: cover;
  background: #f2f4f7;
  flex: 0 0 85px;
}

.tooltip strong {
  display: block;
  font-size: 1rem;
}

.tooltip span,
.tooltip p {
  color: #d0d5dd;
  font-size: 1.25rem;
}

.tooltip p {
  margin: 5px 0;
}

.map-centre-label,
.chair-label {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  font-family: Georgia, 'Times New Roman', serif;
  font-weight: 700;
  color: #111;
  pointer-events: none;
}

.map-centre-label {
  top: 47.5%;
  font-size: clamp(1rem, 2.3vw, 1.65rem);
}

.chair-label {
  top: 92%;
  font-size: clamp(0.82rem, 1.6vw, 1.2rem);
}

.back-link {
  display: inline-block;
  color: #b9d9ff;
  margin-bottom: 16px;
  text-decoration: none;
  font-weight: 700;
}

.back-link:hover {
  text-decoration: underline;
}

.profile-card {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 28px;
  padding: 26px;
  margin-bottom: 22px;
}

.profile-main-image {
  width: 100%;
  max-width: 260px;
  aspect-ratio: 1 / 1;
  border-radius: 24px;
  object-fit: cover;
  background: #f2f4f7;
  border: 1px solid var(--border);
}

.profile-content h2 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  margin: 8px 0 18px;
  line-height: 1;
}

.party-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin: 0;
  padding: 8px 12px;
  border-radius: 999px;
  color: white;
  background: var(--badge-colour, #111827);
  font-weight: 700;
}

.profile-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 0;
}

.profile-facts div {
  padding: 14px;
  border-radius: 14px;
  background: #f8fafc;
  border: 1px solid var(--border);
}

.profile-facts dt {
  font-size: 0.78rem;
  color: var(--muted);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 6px;
}

.profile-facts dd {
  margin: 0;
  font-weight: 700;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.info-card {
  padding: 22px;
  line-height: 1.65;
}

.info-card h3 {
  margin-top: 0;
}

@media (max-width: 820px) {
  .controls-card,
  .profile-card,
  .info-grid,
  .profile-facts {
    grid-template-columns: 1fr;
  }

  .map-heading {
    display: block;
  }

  .tooltip {
    width: 205px;
  }
}
.site-footer {
  margin-top: 50px;
  background: #111827;
  color: white;
  padding: 42px 24px 20px;
}

.footer-content {
  width: min(1100px, 100%);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
}

.site-footer h2,
.site-footer h3 {
  margin-top: 0;
  margin-bottom: 12px;
}

.site-footer h2 {
  font-size: 1.4rem;
}

.site-footer h3 {
  font-size: 1rem;
}

.site-footer p {
  margin: 7px 0;
  color: #d1d5db;
  line-height: 1.6;
}

.footer-contact a {
  color: #93c5fd;
  text-decoration: none;
}

.footer-contact a:hover {
  text-decoration: underline;
}

.footer-bottom {
  width: min(1100px, 100%);
  margin: 30px auto 0;
  padding-top: 18px;
  border-top: 1px solid #374151;
  font-size: 0.85rem;
}
/* Header and hamburger menu */
.site-header {
  position: relative;
}

.header-inner {
  width: min(1120px, 100%);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 30px;
}

.menu-wrapper {
  position: relative;
  flex-shrink: 0;
}

.menu-toggle {
  width: 48px;
  height: 48px;
  border: none;
  border-radius: 12px;
  background: #111827;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 6px;
}

.menu-toggle span {
  width: 23px;
  height: 3px;
  background: white;
  border-radius: 10px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.menu-toggle:hover {
  background: #1f2937;
}

.menu-toggle.is-open span:nth-child(1) {
  transform: translateY(9px) rotate(45deg);
}

.menu-toggle.is-open span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.is-open span:nth-child(3) {
  transform: translateY(-9px) rotate(-45deg);
}

.site-menu {
  position: absolute;
  top: 58px;
  right: 0;
  width: 220px;
  padding: 10px;
  background: white;
  border: 1px solid #dbe2ea;
  border-radius: 14px;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.16);
  display: none;
  z-index: 2000;
}

.site-menu.open {
  display: block;
}

.site-menu a {
  display: block;
  padding: 12px;
  color: #111827;
  text-decoration: none;
  border-radius: 9px;
  font-weight: 600;
}

.site-menu a:hover {
  background: #f1f5f9;
}

/* New About and Contact page */
.simple-page-header {
  width: min(1100px, 100%);
  margin: 0 auto;
  padding: 40px 24px 20px;
}

.back-link {
  display: inline-block;
  margin-bottom: 20px;
  color: #1d4ed8;
  font-weight: 700;
  text-decoration: none;
}

.back-link:hover {
  text-decoration: underline;
}

.info-page {
  width: min(900px, calc(100% - 48px));
  margin: 20px auto 60px;
}

.info-card {
  margin-bottom: 20px;
  padding: 28px;
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
}

.info-card h2 {
  margin-top: 0;
}

.info-card a {
  color: #1d4ed8;
}

@media (max-width: 650px) {
  .header-inner {
    align-items: flex-start;
  }

  .menu-toggle {
    width: 44px;
    height: 44px;
  }
}