/* LASERWAR Map Widget — scoped for Tilda embed */
.lw-map-widget {
  --lw-map-height: 650px;
  --lw-color-primary: #c9323b;
  --lw-color-primary-dark: #780b1e;
  --lw-color-accent: #e71e15;
  --lw-color-text: #333;
  --lw-color-bg: #fff;
  position: relative;
  width: 100%;
  overflow: visible;
  font-family: Arial, Helvetica, sans-serif;
  box-sizing: border-box;
}

.lw-map-widget *,
.lw-map-widget *::before,
.lw-map-widget *::after {
  box-sizing: border-box;
}

.lw-map-widget__layout {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 0;
  min-height: var(--lw-map-height);
}

.lw-map-widget__map {
  flex: 1 1 60%;
  min-width: 280px;
  width: 100%;
  height: var(--lw-map-height);
  min-height: 400px;
  max-height: calc(100vh - 82px);
}

.lw-map-widget__nav {
  flex: 0 0 320px;
  max-width: 100%;
  width: 320px;
  background: var(--lw-color-bg);
  overflow-y: auto;
  max-height: var(--lw-map-height);
  position: relative;
  z-index: 2;
  box-shadow: -2px 0 12px rgba(0, 0, 0, 0.15);
}

/* Country navigation */
.lw-map-widget .country-clients {
  border-bottom: 1px solid #e8e8e8;
}

.lw-map-widget .country-clients.closed .clients,
.lw-map-widget .country-clients.closed .btn-back {
  display: none;
}

.lw-map-widget .country-clients.opened .country-title a {
  color: var(--lw-color-accent);
  font-weight: 700;
}

.lw-map-widget .country-title {
  margin: 0;
  padding: 0;
}

.lw-map-widget .country-title a {
  display: block;
  padding: 14px 40px 14px 16px;
  font-size: 1rem;
  font-weight: 600;
  color: var(--lw-color-text);
  text-decoration: none;
  border-left: 3px solid transparent;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
  cursor: pointer;
}

.lw-map-widget .country-title a:hover {
  background: #f5f5f5;
  border-left-color: var(--lw-color-primary);
  color: var(--lw-color-primary);
}

.lw-map-widget .clients {
  list-style: none;
  margin: 0;
  padding: 0 0 8px;
}

.lw-map-widget .clients li {
  margin: 0;
  padding: 0;
}

.lw-map-widget .clients li a {
  display: block;
  padding: 8px 16px 8px 28px;
  font-size: 0.9375rem;
  color: #555;
  text-decoration: none;
  border-left: 3px solid transparent;
  transition: background 0.15s, color 0.15s;
}

.lw-map-widget .clients li a:hover,
.lw-map-widget .clients li a.active {
  background: #fff0f0;
  color: var(--lw-color-primary);
  border-left-color: var(--lw-color-primary);
  font-weight: 600;
}

.lw-map-widget .btn-back {
  display: block;
  margin: 8px 16px 12px;
  padding: 8px 12px;
  font-size: 0.875rem;
  color: var(--lw-color-primary);
  text-decoration: none;
  cursor: pointer;
}

.lw-map-widget .btn-back::before {
  content: '← Назад к странам';
}

.lw-map-widget .btn-back:hover {
  text-decoration: underline;
}

/* Google Maps InfoWindow popup */
.lw-map-widget .contacts-popup,
.gm-style .contacts-popup {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 14px;
  line-height: 1.4;
  color: #333;
  max-width: 280px;
}

.lw-map-widget .contacts-popup .h5,
.gm-style .contacts-popup .h5 {
  font-size: 16px;
  font-weight: 700;
  margin: 0 0 8px;
  color: var(--lw-color-primary);
}

.lw-map-widget .contacts-popup a,
.gm-style .contacts-popup a {
  color: var(--lw-color-primary);
  word-break: break-all;
}

.lw-map-widget .contacts-popup strong,
.gm-style .contacts-popup strong {
  color: #666;
}

/* Responsive — Tilda mobile */
@media (max-width: 767px) {
  .lw-map-widget__layout {
    flex-direction: column;
  }

  .lw-map-widget__map {
    flex: 1 1 100%;
    min-height: 50vh;
    order: 1;
  }

  .lw-map-widget__nav {
    flex: 1 1 100%;
    width: 100%;
    max-height: none;
    order: 2;
    box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.1);
  }
}

@media (min-width: 768px) and (max-width: 1024px) {
  .lw-map-widget__nav {
    flex: 0 0 280px;
    width: 280px;
  }
}
