/* ════════════════════════════════════════
   MODALS
════════════════════════════════════════ */
.overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(14,42,94,.45);
  z-index: 100;
  align-items: flex-end;
  justify-content: center;
}
.overlay.open { display: flex; animation: fade-backdrop .2s ease; }

@keyframes fade-backdrop {
  from { background: rgba(14,42,94,0); }
  to   { background: rgba(14,42,94,.45); }
}

.sheet {
  background: var(--white);
  border-radius: 20px 20px 0 0;
  padding: 18px 22px 36px;
  width: 100%; max-width: 560px;
  max-height: 92dvh;
  overflow-y: auto;
  box-shadow: 0 -4px 32px rgba(14,42,94,.12);
  animation: slide-up .25s cubic-bezier(.32,.72,0,1);
}
.sheet-sm { max-height: 290px; }

@keyframes slide-up {
  from { transform: translateY(100%); opacity: .5; }
  to   { transform: translateY(0);    opacity: 1;  }
}

.sheet-handle {
  width: 36px; height: 4px;
  background: var(--border); border-radius: 2px;
  margin: 0 auto 18px;
}
.sheet-title {
  font-family: var(--fh);
  font-size: 1.25rem; color: var(--dark); margin-bottom: 4px;
}
.sheet-sub { font-size: 13px; color: var(--muted); margin-bottom: 18px; line-height: 1.55; }

/* ── Form elements ── */
.fgroup { margin-bottom: 16px; }
.flabel {
  font-size: 11px; font-weight: 600; color: var(--dark);
  display: block; margin-bottom: 6px; letter-spacing: .3px;
  text-transform: uppercase;
}
.fhint { font-size: 11px; color: var(--muted); margin-top: 5px; line-height: 1.45; }

input[type="text"],
input[type="url"],
select,
textarea {
  width: 100%;
  font-family: var(--fb); font-size: 14px; color: var(--text);
  background: var(--bg);
  border: 1.5px solid var(--border); border-radius: var(--r-sm);
  padding: 10px 13px; outline: none;
  transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(55,122,255,.12);
}
textarea { resize: vertical; min-height: 90px; line-height: 1.55; }

.url-status {
  margin-top: 7px; font-size: 12px; min-height: 18px;
  display: flex; align-items: center; gap: 6px;
}
.url-status.checking { color: var(--muted); }
.url-status.ok       { color: #2e7d32; }
.url-status.err      { color: var(--danger); }
.sdot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.checking .sdot { background: var(--muted); animation: pulse 1s ease infinite; }
.ok .sdot       { background: #2e7d32; }
.err .sdot      { background: var(--danger); }
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.3} }

.char-count { font-size: 11px; color: var(--muted); text-align: right; margin-top: 4px; }
.char-count.warn { color: var(--danger); }

.divider {
  display: flex; align-items: center; gap: 10px; margin: 16px 0;
}
.dline { flex: 1; height: 1px; background: var(--border); }
.divider span { font-size: 11px; color: var(--muted); white-space: nowrap; }

.btn-submit {
  width: 100%; background: var(--blue); color: white;
  font-weight: 600; font-size: 14px;
  padding: 13px; border-radius: var(--r-sm);
  transition: background .15s, box-shadow .15s; margin-top: 8px;
  box-shadow: 0 2px 10px rgba(55,122,255,.3);
}
.btn-submit:hover:not(:disabled) {
  background: var(--dark);
  box-shadow: 0 2px 10px rgba(14,42,94,.25);
}
.btn-submit:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; }
.btn-submit.btn-danger { background: var(--danger); box-shadow: 0 2px 10px rgba(192,57,43,.3); }
.btn-submit.btn-danger:hover { background: #922b21; }
.btn-cancel {
  width: 100%; color: var(--muted);
  font-size: 13px; padding: 10px; margin-top: 4px;
  transition: color .12s;
}
.btn-cancel:hover { color: var(--dark); }

/* ── Toast ── */
.toast {
  display: none;
  position: fixed; bottom: 88px; left: 50%;
  transform: translateX(-50%);
  background: var(--dark); color: white;
  font-size: 13px; font-weight: 500;
  padding: 10px 22px;
  border-radius: 99px; z-index: 200;
  white-space: nowrap; pointer-events: none;
  box-shadow: 0 4px 20px rgba(14,42,94,.25);
}
.toast.show { display: block; animation: fadeup 2.8s ease forwards; }
@keyframes fadeup {
  0%   { opacity:0; transform:translateX(-50%) translateY(10px); }
  12%  { opacity:1; transform:translateX(-50%) translateY(0); }
  80%  { opacity:1; }
  100% { opacity:0; }
}

/* ════════════════════════════════════════
   CONSENT OVERLAY
════════════════════════════════════════ */
.consent-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(14,42,94,0.65);
  z-index: 500;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.consent-overlay.open { display: flex; }

.consent-box {
  background: var(--white);
  border-radius: 18px;
  padding: 32px 28px 28px;
  max-width: 460px;
  width: 100%;
  box-shadow: 0 12px 48px rgba(14,42,94,.22);
  animation: scale-in .22s cubic-bezier(.32,.72,0,1);
}
@keyframes scale-in {
  from { transform: scale(.96); opacity: 0; }
  to   { transform: scale(1);   opacity: 1; }
}

.consent-logo {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 20px;
}
.consent-logo img { width: 36px; height: 36px; }
.consent-logo span { font-family: var(--fh); font-style: italic; font-size: 1rem; color: var(--dark); }
.consent-title { font-family: var(--fh); font-size: 1.3rem; color: var(--dark); margin-bottom: 12px; }
.consent-body { font-size: 13px; color: var(--muted); line-height: 1.7; margin-bottom: 16px; }
.consent-body strong { color: var(--text); }
.consent-check {
  display: flex; align-items: flex-start; gap: 10px;
  font-size: 13px; color: var(--text);
  margin-bottom: 20px; line-height: 1.55;
  background: var(--bg);
  padding: 12px 14px;
  border-radius: var(--r-md);
  border: 1px solid var(--border);
}
.consent-check input[type="checkbox"] {
  width: 18px; height: 18px; margin-top: 2px;
  accent-color: var(--blue);
  flex-shrink: 0;
  cursor: pointer;
}
.consent-check label { cursor: pointer; }
.consent-check a { color: var(--blue); }
.btn-consent {
  width: 100%;
  background: var(--blue); color: white;
  font-family: var(--fb); font-weight: 600; font-size: 14px;
  padding: 13px; border: none; border-radius: var(--r-sm);
  transition: background .15s, box-shadow .15s;
  box-shadow: 0 2px 10px rgba(55,122,255,.3);
}
.btn-consent:hover:not(:disabled) {
  background: var(--dark);
  box-shadow: 0 2px 10px rgba(14,42,94,.25);
}
.btn-consent:disabled { opacity: .4; cursor: not-allowed; box-shadow: none; }
.consent-note { font-size: 11px; color: var(--muted); text-align: center; margin-top: 12px; }
