/* css/common.css */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Crimson Pro', Georgia, serif;
  height: 100dvh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

#map {
  flex: 1;
  z-index: 1;
}

.button, .hud-btn, .action-btn, .filter-btn {
  padding: 10px 20px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  font-size: 1rem;
}

#hud {
  position: absolute;
  top: 12px;
  left: 12px;
  right: 12px;
  z-index: 600;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  pointer-events: none;
}
#hud > * {
  pointer-events: all;
}

#overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0,0,0,0.3);
  z-index: 500;
  display: none;
}

#splash {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0,0,0,0.85);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.splash-bar-wrap {
  width: 80%;
  background: #333;
  border-radius: 8px;
  margin: 16px auto 0 auto;
  height: 8px;
  overflow: hidden;
}
.splash-bar {
  width: 0%;
  height: 100%;
  background: #d4af37;
  transition: width 0.5s;
}

.sponsor-marker {
  background: transparent;
  border: 0;
}

.sponsor-pin-hit {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
}

.sponsor-pin {
  width: 26px;
  height: 26px;
  position: relative;
  transform: rotate(-45deg);
  border-radius: 50% 50% 50% 6px;
  background: linear-gradient(135deg, #ffd66b, #f08a32);
  border: 2px solid #fff7d1;
  box-shadow: 0 5px 12px rgba(0, 0, 0, 0.32);
}

.sponsor-pin span {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  transform: rotate(45deg);
  color: #3b2108;
  font-size: 0.8rem;
  line-height: 1;
}

.sponsored-map-pin {
  width: 34px;
  height: 34px;
  position: relative;
  display: grid;
  place-items: center;
  transform: rotate(-45deg);
  border-radius: 50% 50% 50% 8px;
  background: linear-gradient(135deg, #ffd66b, #f08a32);
  border: 3px solid #fff8d9;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.34);
}

.sponsored-map-pin span {
  display: block;
  transform: rotate(45deg);
  color: #3b2108;
  font-size: 1rem;
  line-height: 1;
  font-weight: 900;
}

.marker-pin.sponsor-pin-map {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50% 50% 50% 8px;
  background: linear-gradient(135deg, #ffd66b, #f08a32);
  border: 3px solid #fff8d9;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.34);
}

.marker-pin.sponsor-pin-map::after {
  display: none;
}

.marker-pin.sponsor-pin-map span {
  display: block;
  transform: rotate(45deg);
  color: #3b2108;
  font-size: 1rem;
  line-height: 1;
  font-weight: 900;
}

.sponsor-custom-popup .leaflet-popup-content-wrapper {
  width: auto !important;
  min-width: 260px !important;
  max-width: min(340px, 92vw) !important;
}

.sponsor-custom-popup .leaflet-popup-content {
  width: auto !important;
  min-width: 240px !important;
  margin: 14px !important;
}

.sponsor-popup {
  display: block !important;
  width: 100%;
  min-width: 260px;
  white-space: normal;
}

.custom-popup .leaflet-popup-content-wrapper {
  width: auto !important;
  min-width: 300px !important;
  max-width: min(360px, 92vw) !important;
}

.custom-popup .leaflet-popup-content {
  width: auto !important;
  min-width: 280px !important;
  max-width: min(340px, 86vw) !important;
  margin: 14px !important;
}

.custom-popup .popup-inner {
  display: block !important;
  min-width: 260px;
  max-width: 320px;
  white-space: normal;
}

.sponsor-popup h3,
.sponsor-popup .addr,
.sponsor-popup .hint,
.sponsor-popup .sponsor-link,
.sponsor-popup .sponsor-route-btn,
.sponsor-popup .sponsor-coupon {
  display: flex;
  width: 100%;
}

.sponsor-popup h3 {
  display: block;
}

.sponsor-label {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  margin-bottom: 8px;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(255, 214, 107, 0.18);
  color: #ffd66b;
  font-size: 0.75rem;
  font-weight: 900;
  text-transform: uppercase;
}

.sponsor-popup .sponsor-link {
  align-items: center;
  justify-content: center;
  text-decoration: none;
  margin-top: 8px;
}

.sponsor-popup .sponsor-route-btn {
  margin-top: 6px;
}

.sponsor-coupon {
  margin: 10px 0 2px;
  padding: 9px 10px;
  border-radius: 10px;
  background: rgba(255, 214, 107, 0.13);
  border: 1px dashed rgba(255, 214, 107, 0.48);
  color: #ffe6a4;
  font-weight: 800;
}

.sponsor-coupon-box {
  margin: 12px 0;
  padding: 12px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(255, 214, 107, 0.22), rgba(240, 138, 50, 0.16));
  border: 2px dashed rgba(255, 214, 107, 0.72);
  text-align: center;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.22);
}

.sponsor-coupon-kicker {
  color: #ffe6a4;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.sponsor-coupon-code {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  margin: 6px 0;
  padding: 8px 14px;
  border-radius: 10px;
  background: #fff8d9;
  color: #3b2108;
  font-family: Arial, sans-serif;
  font-size: 1.15rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.sponsor-coupon-note {
  color: #f8e7bb;
  font-size: 0.86rem;
  line-height: 1.35;
}

.leaflet-control-zoom {
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--gold, #d4af37) 55%, transparent) !important;
  border-radius: 12px !important;
  background: color-mix(in srgb, var(--card, #2a2a2a) 92%, black) !important;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.32) !important;
}

.leaflet-control-zoom a {
  width: 38px !important;
  height: 38px !important;
  line-height: 38px !important;
  background: color-mix(in srgb, var(--card, #2a2a2a) 92%, black) !important;
  border: 0 !important;
  color: var(--gold, #d4af37) !important;
  font-size: 22px !important;
  font-weight: 900 !important;
  text-shadow: none !important;
}

.leaflet-control-zoom a + a {
  border-top: 1px solid color-mix(in srgb, var(--gold, #d4af37) 35%, transparent) !important;
}

.leaflet-control-zoom a:hover,
.leaflet-control-zoom a:focus {
  background: var(--gold, #d4af37) !important;
  color: var(--bg, #121212) !important;
}

.drawer-footer-actions {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  margin-bottom: 8px !important;
}

.drawer-home-link,
.drawer-reset-link {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-width: 78px !important;
  min-height: 36px !important;
  padding: 8px 12px !important;
  border-radius: 10px !important;
  border: 1px solid var(--border, rgba(255, 255, 255, 0.18)) !important;
  background: var(--surface, rgba(0, 0, 0, 0.28)) !important;
  color: var(--text, #f5f5f5) !important;
  font: inherit !important;
  font-size: 0.88rem !important;
  font-weight: 800 !important;
  line-height: 1 !important;
  text-decoration: none !important;
  cursor: pointer !important;
  box-sizing: border-box !important;
}

.drawer-home-link {
  border-color: color-mix(in srgb, var(--gold, #d4af37) 58%, transparent) !important;
  color: var(--gold, #d4af37) !important;
}

.drawer-reset-link {
  background: transparent !important;
  color: var(--muted, rgba(255, 255, 255, 0.72)) !important;
  min-width: 42px !important;
  width: 42px !important;
  padding-inline: 0 !important;
  overflow: hidden !important;
  text-indent: -999px !important;
  position: relative !important;
}

.drawer-reset-link::after {
  content: "↻";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  text-indent: 0;
  font-size: 1.1rem;
}

.drawer-home-link:hover,
.drawer-home-link:focus,
.drawer-reset-link:hover,
.drawer-reset-link:focus {
  border-color: var(--gold, #d4af37) !important;
  background: color-mix(in srgb, var(--gold, #d4af37) 16%, transparent) !important;
  color: var(--text, #f5f5f5) !important;
}

.drawer-social-links {
  margin: 10px 0 8px;
  justify-content: center;
}

.drawer-social-links a {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.08);
  color: var(--gold, #d4af37);
}

#congrats {
  isolation: isolate !important;
}

#congrats::before {
  content: "" !important;
  position: absolute !important;
  left: 50% !important;
  top: calc(50% - 86px) !important;
  width: 156px !important;
  height: 156px !important;
  border-radius: 50% !important;
  transform: translate(-50%, -50%) !important;
  background:
    radial-gradient(circle, rgba(234, 179, 8, 0.36) 0%, rgba(234, 179, 8, 0.23) 38%, rgba(234, 179, 8, 0.08) 62%, transparent 74%) !important;
  filter: blur(1px) !important;
  z-index: -1 !important;
  pointer-events: none !important;
}

#congrats img[id^="congrats"] {
  position: relative !important;
  z-index: 1 !important;
  background: transparent !important;
  border: 0 !important;
  object-fit: contain !important;
  mix-blend-mode: normal !important;
  -webkit-mask-image: none !important;
  mask-image: none !important;
}

#congrats h2,
#congrats p {
  position: relative !important;
  z-index: 1 !important;
}

#title-card h1,
#splash h1,
#drawer-head h2,
#drawer-header h2 {
  font-family: 'Cinzel Decorative', 'Cinzel', Georgia, serif !important;
  font-weight: 900 !important;
  letter-spacing: 0.02em !important;
}

.language-switcher {
  position: relative;
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  padding: 4px;
  border: 1px solid color-mix(in srgb, var(--gold, #d4af37) 46%, transparent);
  border-radius: 12px;
  background: rgba(13, 18, 13, 0.82);
  backdrop-filter: blur(12px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28);
}

.language-switcher-map {
  margin-left: 4px;
  box-shadow: none;
  background: var(--surface, rgba(0, 0, 0, 0.28));
}

.language-switcher-page {
  margin: 10px auto 16px;
}

.language-switcher button,
.language-suggestion button {
  border: 0;
  border-radius: 8px;
  padding: 7px 10px;
  background: transparent;
  color: var(--gold, #d4af37);
  font: 800 0.78rem 'Inter', Arial, sans-serif;
  cursor: pointer;
}

.language-current {
  min-width: 34px;
  min-height: 32px;
}

.language-current span {
  display: block;
  font-size: 1.05rem;
  line-height: 1;
}

.flag-icon {
  display: inline-block;
  width: 22px;
  height: 15px;
  flex: 0 0 auto;
  border-radius: 2px;
  border: 1px solid color-mix(in srgb, var(--text, #f5eddc) 55%, transparent);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.28);
  vertical-align: middle;
}

.flag-pl {
  background: linear-gradient(to bottom, #fff 0 50%, #dc143c 50% 100%);
}

.flag-gb {
  background: #012169 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 40'%3E%3CclipPath id='a'%3E%3Cpath d='M0 0h60v40H0z'/%3E%3C/clipPath%3E%3Cg clip-path='url(%23a)'%3E%3Cpath fill='%23012169' d='M0 0h60v40H0z'/%3E%3Cpath stroke='%23fff' stroke-width='8' d='m0 0 60 40M60 0 0 40'/%3E%3Cpath stroke='%23C8102E' stroke-width='4.8' d='m0 0 60 40M60 0 0 40'/%3E%3Cpath stroke='%23fff' stroke-width='13' d='M30 0v40M0 20h60'/%3E%3Cpath stroke='%23C8102E' stroke-width='8' d='M30 0v40M0 20h60'/%3E%3C/g%3E%3C/svg%3E") center / cover no-repeat;
}

.language-menu {
  position: absolute;
  right: 0;
  bottom: calc(100% + 8px);
  z-index: 2;
  display: grid;
  gap: 6px;
  min-width: 150px;
  max-width: calc(100vw - 24px);
  padding: 10px;
  border: 1px solid color-mix(in srgb, var(--gold, #d4af37) 46%, transparent);
  border-radius: 12px;
  background: rgba(13, 18, 13, 0.96);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.32);
}

.language-menu[hidden] {
  display: none;
}

.language-menu span {
  color: var(--text, #f5eddc);
  font-size: 0.76rem;
  font-weight: 800;
}

.language-menu button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  justify-content: flex-start;
  text-align: left;
  white-space: nowrap;
}

.language-menu button.active,
.language-menu button:hover,
.language-menu button:focus,
.language-suggestion button:first-of-type {
  background: var(--gold, #d4af37);
  color: #182018;
}

@media (max-width: 680px) {
  .language-switcher-page .language-menu {
    left: 50%;
    right: auto;
    transform: translateX(-50%);
  }

  .language-switcher-map .language-menu {
    right: 0;
    left: auto;
    transform: none;
  }
}

.language-suggestion {
  position: fixed;
  left: 50%;
  bottom: max(14px, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  z-index: 90000;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: min(92vw, 520px);
  padding: 10px;
  border: 1px solid color-mix(in srgb, var(--gold, #d4af37) 46%, transparent);
  border-radius: 14px;
  background: rgba(13, 18, 13, 0.92);
  color: var(--text, #f5eddc);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.36);
  backdrop-filter: blur(14px);
}

.language-suggestion span {
  font-weight: 800;
}

#drawer-actions .action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 54px;
  text-align: center;
  line-height: 1.15;
}

#drawer-actions .locate-action-btn {
  white-space: nowrap;
}
/*
  Copyright (c) Smart Commerce. All rights reserved.
  Shared Tropiciele Legend UI, game interface styles and visual patterns
  are protected by copyright. No permission is granted to copy, clone,
  reproduce, scrape for replication, train AI models on, or generate
  derivative competing versions without prior written consent.
*/
