/* ---------- Модальные окна (<dialog>) ---------- */
.modal {
  width: min(564px, calc(100% - 32px)); max-height: calc(100dvh - 32px);
  padding: 0; border: 0; border-radius: var(--radius); background: #fff; color: var(--c-text);
  box-shadow: 0 24px 64px rgba(18, 51, 89, .25); overflow: visible;
}
.modal::backdrop { background: rgba(18, 51, 89, .6); }
.modal[open] { display: block; animation: modal-in .18s ease-out; }
.modal__box { position: relative; padding: 28px; max-height: calc(100dvh - 32px); overflow-y: auto; border-radius: var(--radius); }
.modal--sm { width: min(275px, calc(100% - 32px)); }
.modal--sm .modal__box { display: flex; flex-direction: column; gap: 37px; }
.modal--sm .modal__title, .modal--sm .modal__text { padding-right: 0; text-align: center; }
.modal__title { font-size: 22px; line-height: 1.25; font-weight: 600; color: var(--c-text); padding-right: 36px; }
.modal__subtitle { font-size: 18px; line-height: 1.3; font-weight: 600; color: var(--c-text); }
.modal__close { position: absolute; top: 14px; right: 14px; width: 36px; height: 36px; display: grid; place-items: center; color: var(--c-text-2); border-radius: var(--radius); }
.modal__close:hover { color: var(--c-text); background: var(--c-bg-soft); }
.modal__close .icon { width: 20px; height: 20px; }
#modal-analog, #modal-nameplate, #modal-kp-list, #modal-complex { width: min(551px, calc(100% - 32px)); }
.modal .btn { min-height: 48px; padding: 0 22px; }
@keyframes modal-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- Уведомление о cookie ---------- */
.cookie-banner {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 900;
  max-width: 640px; padding: 18px 20px;
  display: flex; flex-direction: column; gap: 14px;
  background: #fff; color: var(--c-text-2); border: 1px solid var(--c-border); border-radius: var(--radius);
  box-shadow: 0 12px 40px rgba(18, 51, 89, .22);
  font-size: 14px; line-height: 1.5;
}
.cookie-banner[hidden] { display: none; }
.cookie-banner__text { margin: 0; }
.cookie-banner__text a { color: var(--c-navy); text-decoration: underline; }
.cookie-banner__text a:hover { text-decoration: none; }
.cookie-banner .btn { align-self: flex-start; }
@media (min-width: 768px) {
  .cookie-banner { left: 24px; right: auto; bottom: 24px; flex-direction: row; align-items: center; gap: 20px; }
  .cookie-banner .btn { align-self: center; flex: none; }
}
