/* ============================================================
   ВЫБОР СПОСОБА СВЯЗИ
   Кнопка открывает рядом небольшое меню: WhatsApp или звонок.
   На узких экранах меню превращается в панель снизу экрана.
   Разметку и поведение см. assets/js/contact-choice.js
   ============================================================ */
.cc-wrap { position: relative; display: inline-block; }

.cc-menu {
  position: absolute;
  top: calc(100% + .625rem);
  left: 0;
  z-index: 120;
  min-width: 16rem;
  padding: .375rem;
  background: var(--color-bg);
  border: 1px solid var(--color-divider);
  border-radius: .75rem;
  box-shadow: 0 10px 30px rgba(44, 42, 38, .12);
}
.cc-menu[hidden] { display: none; }

.cc-item {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .75rem .875rem;
  border-radius: .5rem;
  font-family: var(--font-body);
  font-size: .9375rem;
  line-height: 1.3;
  color: var(--color-text);
  text-decoration: none;
  transition: background 180ms cubic-bezier(.16,1,.3,1), color 180ms cubic-bezier(.16,1,.3,1);
}
.cc-item + .cc-item { margin-top: .125rem; }
.cc-item:hover { background: var(--color-surface); }
.cc-item:focus-visible { outline: 2px solid var(--color-gold); outline-offset: -2px; }
.cc-item svg { flex-shrink: 0; }
.cc-item-sub {
  display: block;
  margin-top: .125rem;
  font-size: .75rem;
  color: var(--color-text-muted);
}
.cc-item--wa svg { color: var(--color-whatsapp, #25D366); }
.cc-item--tel svg { color: var(--color-gold); }

.cc-backdrop { display: none; }

@media (max-width: 640px) {
  /* компактная панель снизу экрана */
  .cc-backdrop {
    display: block;
    position: fixed; inset: 0; z-index: 190;
    background: rgba(44, 42, 38, .45);
  }
  .cc-backdrop[hidden] { display: none; }
  .cc-menu {
    position: fixed;
    top: auto; left: 0; right: 0; bottom: 0;
    z-index: 200;
    min-width: 0;
    padding: .5rem .75rem calc(.75rem + env(safe-area-inset-bottom));
    border-radius: .875rem .875rem 0 0;
    border-bottom: none;
  }
  .cc-menu::before {
    content: '';
    display: block;
    width: 2.5rem; height: 3px;
    margin: .375rem auto .5rem;
    border-radius: 999px;
    background: var(--color-divider);
  }
  .cc-item { padding: .9375rem .875rem; font-size: 1rem; }
}

@media (prefers-reduced-motion: reduce) {
  .cc-item { transition: none; }
}

/* Уведомление о переходе во внешний сервис (WhatsApp). Текст, не барьер:
   кнопка по-прежнему открывает чат напрямую. */
.cc-menu .wa-note, .wa-note {
  margin: .75rem 0 0; font-family: var(--font-body); font-size: .75rem; line-height: 1.6;
  color: var(--color-text-muted); max-width: 34rem;
}
.cc-menu .wa-note { padding: .75rem .875rem 0; border-top: 1px solid var(--color-divider); }
.wa-note a { color: var(--color-gold-text, var(--color-gold)); text-decoration: underline; text-underline-offset: .15em; }
