/* Contacts map: lazy-loaded Google + Yandex embed (placeholder → iframe on click). */

.aic-cmap {
  --aic-cmap-h-desk: 480px;
  --aic-cmap-h-mob: 320px;
  position: relative;
  width: 100%;
  max-width: none;
  margin: 0 0 32px;
  border-radius: 16px;
  overflow: hidden;
  background: #f1f5f9;
  box-shadow: 0 1px 3px rgba(15, 23, 42, .06);
}
/* When map is placed AFTER columns (below_form position), flip the margin */
.wp-block-columns + .aic-cmap,
.wp-block-columns + p > .aic-cmap,
.wp-block-columns ~ .aic-cmap { margin: 32px 0 0; }
@media (max-width: 768px) {
  .aic-cmap { margin: 0 0 24px; }
  .wp-block-columns + .aic-cmap,
  .wp-block-columns ~ .aic-cmap { margin: 24px 0 0; }
}

.aic-cmap__tabs {
  display: flex;
  gap: 4px;
  padding: 6px;
  background: #fff;
  border-bottom: 1px solid #e2e8f0;
}
.aic-cmap__tab {
  flex: 0 0 auto;
  padding: 8px 18px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 999px;
  font: 600 13px/1 inherit;
  color: #475569;
  cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
}
.aic-cmap__tab:hover { background: rgba(9, 202, 143, .08); color: #0f172a; }
.aic-cmap__tab.is-active {
  background: var(--primary-color, #09CA8F);
  color: #fff;
  border-color: var(--primary-color, #09CA8F);
}

.aic-cmap__panel {
  position: relative;
  width: 100%;
  height: var(--aic-cmap-h-desk);
  display: none;
}
.aic-cmap__panel.is-active { display: block; }

.aic-cmap__panel iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

.aic-cmap__placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 24px;
  text-align: center;
  cursor: pointer;
  background:
    radial-gradient(ellipse at 30% 40%, rgba(9, 202, 143, .18), transparent 55%),
    radial-gradient(ellipse at 70% 60%, rgba(8, 171, 121, .12), transparent 55%),
    linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
  transition: background .2s;
}
.aic-cmap__placeholder:hover {
  background:
    radial-gradient(ellipse at 30% 40%, rgba(9, 202, 143, .26), transparent 55%),
    radial-gradient(ellipse at 70% 60%, rgba(8, 171, 121, .18), transparent 55%),
    linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
}
.aic-cmap__pin {
  color: var(--primary-color, #09CA8F);
  filter: drop-shadow(0 2px 6px rgba(9, 202, 143, .25));
}
.aic-cmap__addr {
  font-size: 16px;
  font-weight: 600;
  color: #0f172a;
  max-width: 360px;
  line-height: 1.4;
}
.aic-cmap__btn {
  padding: 12px 28px;
  background: var(--primary-color, #09CA8F);
  color: #fff;
  border: 0;
  border-radius: 999px;
  font: 600 14px/1 inherit;
  cursor: pointer;
  transition: background .15s, transform .15s, box-shadow .15s;
  box-shadow: 0 2px 8px rgba(9, 202, 143, .3);
}
.aic-cmap__btn:hover {
  background: var(--primary-hover, #08AB79);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(9, 202, 143, .4);
}
.aic-cmap__btn:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}
.aic-cmap__link {
  font-size: 13px;
  color: #475569;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.aic-cmap__link:hover { color: var(--primary-hover, #08AB79); }

.aic-cmap__placeholder.is-loading {
  background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e1 100%);
  pointer-events: none;
}
.aic-cmap__placeholder.is-loading::after {
  content: '';
  position: absolute;
  width: 32px; height: 32px;
  border: 3px solid rgba(0, 0, 0, .12);
  border-top-color: var(--primary-color, #09CA8F);
  border-radius: 50%;
  animation: aic-cmap-spin .8s linear infinite;
}
@keyframes aic-cmap-spin { to { transform: rotate(360deg); } }

@media (max-width: 768px) {
  .aic-cmap__panel { height: var(--aic-cmap-h-mob); }
  .aic-cmap__addr { font-size: 15px; }
  .aic-cmap__btn { padding: 10px 22px; font-size: 13px; }
  .aic-cmap__tab { padding: 7px 14px; font-size: 12px; }
}
