/* NOM-638: оповещение «Новый офис в Сочи».
   Разметка рождается в scripts/nomera_sochi_office.py, здесь только вид.
   Карточка position:fixed — в потоке страницы её нет, поэтому сдвига вёрстки
   она не даёт ни при показе, ни при закрытии. */

.sochi-office[hidden] {
  display: none;
}

.sochi-office {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: 16px;
  bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  z-index: 90;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  column-gap: 12px;
  align-items: start;
  padding: 12px;
  border: 1px solid var(--border-strong, rgba(255, 255, 255, 0.16));
  border-radius: 14px;
  background: #141a2c;
  color: #fff;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.5), 0 2px 8px rgba(0, 0, 0, 0.35);
  animation: sochi-office-in 0.25s ease both;
}

.sochi-office-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--accent, #7c8cff);
  color: #fff;
}

.sochi-office-icon svg,
.sochi-office-close svg {
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sochi-office-icon svg {
  width: 24px;
  height: 24px;
}

.sochi-office-body {
  min-width: 0;
}

.sochi-office-title {
  margin: 0 0 2px;
  font-family: "Manrope", "Inter", system-ui, sans-serif;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.3;
  color: #fff;
}

.sochi-office-phone,
.sochi-office-link {
  display: block;
  padding: 2px 0;
  text-decoration: none;
  line-height: 1.35;
}

.sochi-office-phone {
  font-size: 15px;
  font-weight: 600;
  color: #fff;
}

.sochi-office-link {
  font-size: 13px;
  font-weight: 600;
  color: #9fb0ff;
}

.sochi-office-phone:hover,
.sochi-office-link:hover {
  text-decoration: underline;
}

/* NOM-639: цвет каждой строки задан ЯВНО и привязан к карточке. В styles.css есть
   правило «.lead, …, p { color: rgba(17,24,39,.68) !important }»: оно красило
   заголовок (это <p>) в тёмный на тёмной карточке, контраст 1.03. Против
   !important обычный цвет бессилен, поэтому здесь тоже !important, а
   специфичность выше (.sochi-office .класс). */
.sochi-office .sochi-office-title {
  color: #fff !important;
}

.sochi-office .sochi-office-phone {
  color: #fff !important;
}

.sochi-office .sochi-office-link {
  color: #9fb0ff !important;
}

.sochi-office-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: rgba(255, 255, 255, 0.72);
  cursor: pointer;
  align-self: start;
  -webkit-tap-highlight-color: transparent;
}

.sochi-office-close svg {
  width: 20px;
  height: 20px;
}

.sochi-office-close:hover,
.sochi-office-close:focus-visible {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

@keyframes sochi-office-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sochi-office {
    animation: none;
  }
}

@media (min-width: 768px) {
  .sochi-office {
    left: auto;
    right: 24px;
    bottom: 24px;
    bottom: calc(24px + env(safe-area-inset-bottom, 0px));
    width: 380px;
    max-width: calc(100vw - 48px);
  }
}
