﻿.emergency-gate-note {
  margin: 2px 0 24px;
  padding: 15px 16px;
  border: 1px solid rgba(230, 70, 68, 0.14);
  border-radius: 12px;
  background: #fff;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.55;
}

.emergency-dialog[hidden],
.emergency-dialog [hidden] {
  display: none !important;
}

.emergency-dialog {
  --emergency-ink: #a52b29;
  --emergency-action: #d63b39;
  width: min(620px, calc(100vw - 32px));
  max-height: min(90dvh, 820px);
  margin: auto;
  padding: 0;
  overflow: auto;
  border: 1px solid #e7e5e4;
  border-top: 5px solid var(--red);
  border-radius: 20px;
  background: #fff;
  color: var(--text);
  box-shadow: 0 28px 80px rgba(20, 20, 20, 0.28);
}

.emergency-dialog::backdrop {
  background: rgba(20, 20, 20, 0.62);
}

.emergency-dialog-inner {
  padding: 28px 32px 30px;
}

.emergency-dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.emergency-dialog-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--emergency-ink);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.emergency-dialog-close {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 10px;
  background: #f4f4f3;
  color: #555;
  font-size: 25px;
  line-height: 1;
}

.emergency-dialog h2 {
  margin-bottom: 8px;
  color: var(--text);
  font-size: clamp(24px, 5vw, 30px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.emergency-dialog h2:focus { outline: none; }

#emergency-dialog-intro,
.emergency-dialog-copy {
  color: #555;
  font-size: 14px;
  line-height: 1.6;
}

.emergency-dialog-copy { margin-top: 14px; }

.emergency-dialog-price {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin: 22px 0 18px;
  padding: 18px 20px;
  border: 1px solid #efdfc3;
  border-radius: 14px;
  background: #fff8ec;
}

.emergency-dialog-price > span {
  color: #7b5a2b;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.emergency-dialog-price strong {
  color: var(--text);
  font-size: clamp(16px, 4vw, 20px);
  font-weight: 800;
  line-height: 1.35;
}

.emergency-dialog-price small {
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.45;
}

.emergency-dialog-consent {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 24px 0 14px;
  padding: 15px;
  border: 1px solid #e2e2df;
  border-radius: 12px;
  cursor: pointer;
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.5;
}

.emergency-dialog-consent input {
  width: 18px;
  height: 18px;
  margin-top: 1px;
  flex: none;
  accent-color: #15803d;
}

.emergency-dialog-consent:has(input:checked) {
  border-color: #9fceb0;
  background: #f3faf5;
}

.emergency-dialog-continue {
  width: 100%;
  min-height: 46px;
  padding: 11px 18px;
  border-radius: 11px;
  background: var(--emergency-action);
  color: #fff;
  font-size: 14px;
  font-weight: 800;
}

.emergency-dialog-continue:disabled {
  background: #ebebea;
  color: #686866;
  cursor: not-allowed;
}

.emergency-dialog-continue:not(:disabled):hover {
  background: var(--emergency-ink);
}

.emergency-dialog-hint {
  margin-top: 10px;
  color: var(--text-muted);
  font-size: 11px;
  text-align: center;
}

.emergency-dialog-actions {
  display: grid;
  gap: 10px;
  margin-top: 22px;
}

.emergency-dialog-action {
  --channel-accent: var(--navy);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  min-height: 56px;
  padding: 14px 16px;
  border: 1px solid #e2e2df;
  border-left: 3px solid var(--channel-accent);
  border-radius: 12px;
  background: #fff;
  color: var(--text);
  font-size: 14px;
  font-weight: 800;
  text-align: left;
  transition: background 0.18s, border-color 0.18s;
}

.emergency-dialog-action:hover {
  border-color: var(--channel-accent);
  background: #fafaf9;
}

.emergency-dialog-action span {
  flex: none;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
}

.emergency-dialog-action--whatsapp {
  --channel-accent: #15803d;
}

.emergency-dialog-action--kipina {
  --channel-accent: var(--orange);
}

.emergency-dialog-error {
  margin-top: 14px;
  color: #a82020;
  font-size: 12px;
  line-height: 1.5;
}

.emergency-dialog :focus-visible,
[data-emergency-gate-open]:focus-visible {
  outline: 3px solid #a52b29;
  outline-offset: 3px;
}

@media (max-width: 600px) {
  .emergency-dialog {
    width: calc(100vw - 24px);
    max-height: calc(100dvh - 24px);
    border-radius: 16px;
  }

  .emergency-dialog-inner { padding: 18px 18px 22px; }
  .emergency-dialog-price { padding: 15px 16px; }
  .emergency-dialog-action { align-items: flex-start; flex-direction: column; gap: 4px; }
}
