/* ============================================================
   DIALOGS — shared modal overlay styles
   ВікнаДім · used by both "measurement" and "callback" dialogs
   ============================================================ */

/* ---- Overlay ---------------------------------------------- */
.dialog {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 16px;
  overflow-y: auto;
  pointer-events: none;
  opacity: 0;
  transition: opacity .25s var(--ease);
}
@media (min-width: 600px) {
  .dialog { align-items: center; padding: 24px; }
}
.dialog.is-open {
  pointer-events: auto;
  opacity: 1;
}

/* ---- Backdrop --------------------------------------------- */
.dialog__backdrop {
  position: fixed;
  inset: 0;
  background: rgba(14,28,51,.58);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}

/* ---- Panel ------------------------------------------------ */
.dialog__panel {
  position: relative;
  z-index: 1;
  background: #fff;
  border-radius: var(--radius-xl);
  box-shadow: 0 20px 60px rgba(14,28,51,.18), 0 4px 16px rgba(14,28,51,.08);
  width: 100%;
  max-width: 560px;
  transform: translateY(24px) scale(.97);
  transition: transform .3s var(--ease);
  margin-block: auto;
}
.dialog__panel--wide { max-width: 660px; }
.dialog.is-open .dialog__panel { transform: none; }

/* ---- Head ------------------------------------------------- */
.dialog__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 28px 28px 0;
}
@media (min-width: 600px) { .dialog__head { padding: 36px 36px 0; } }

.dialog__icon {
  width: 48px; height: 48px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--blue), #2f6fc0);
  display: grid;
  place-items: center;
  color: #fff;
  flex-shrink: 0;
  margin-bottom: 14px;
  box-shadow: 0 8px 20px rgba(26,77,143,.28);
}
.dialog__icon svg { width: 24px; height: 24px; }

.dialog__title {
  font-family: "Sora", sans-serif;
  font-weight: 800;
  font-size: clamp(20px, 4vw, 26px);
  letter-spacing: -.02em;
  color: var(--ink);
  line-height: 1.1;
}
.dialog__sub {
  font-size: 14px;
  color: var(--muted);
  margin-top: 6px;
  line-height: 1.55;
}

.dialog__close {
  flex-shrink: 0;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--surface);
  display: grid;
  place-items: center;
  font-size: 22px;
  line-height: 1;
  color: var(--muted);
  transition: background .2s, color .2s;
}
.dialog__close:hover { background: var(--line); color: var(--ink); }

/* ---- Body ------------------------------------------------- */
.dialog__body {
  padding: 24px 28px 28px;
}
@media (min-width: 600px) { .dialog__body { padding: 28px 36px 36px; } }

/* ---- Trust row -------------------------------------------- */
.dialog__trust {
  display: flex;
  align-items: center;
  gap: 8px 20px;
  padding: 14px 18px;
  background: var(--surface);
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  margin-bottom: 22px;
  flex-wrap: wrap;
}
.dialog__trust__item {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-2);
}
.dialog__trust__item::before {
  content: "";
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--blue);
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 12 10' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 5l3.5 3.5L11 1' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 10px 8px;
  flex-shrink: 0;
}

/* ---- Note below submit ------------------------------------ */
.dialog__note {
  font-size: 12px;
  color: var(--muted-2);
  margin-top: 12px;
  text-align: center;
  line-height: 1.5;
}
.dialog__note a { color: var(--blue); text-decoration: underline; }

/* ---- Prevent body scroll ---------------------------------- */
body.dialog-open { overflow: hidden; }
