/* ===== БАЗА ===== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body {
  background: radial-gradient(circle at top, #1b3b5e 0, #0b1620 45%, #020509 100%);
  color: #f5f5f5;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ===== ГОЛОВНИЙ ЕКРАН (index.html) ===== */

.wrapper {
  text-align: center;
  padding: 2rem;
  max-width: 960px;
  width: 100%;
}

h1 {
  font-size: 2.2rem;
  margin-bottom: 2.5rem;
  text-shadow: 0 0 18px rgba(0, 0, 0, .8);
}

.buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 240px;
  min-height: 120px;
  padding: 1.5rem 2rem;
  font-size: 1.8rem;
  font-weight: 700;
  border-radius: 24px;
  text-decoration: none;
  color: #fff;
  box-shadow: 0 18px 40px rgba(0, 0, 0, .65), 0 0 0 1px rgba(255, 255, 255, .05);
  transition: transform .15s ease-out, box-shadow .15s ease-out, filter .15s ease-out;
}

.btn-site    { background: linear-gradient(135deg, #1e88e5, #42a5f5); }
.btn-webcall { background: linear-gradient(135deg, #7b1fa2, #ab47bc); }
.btn-call    { background: linear-gradient(135deg, #2e7d32, #43a047); }
.btn-chat    { background: linear-gradient(135deg, #f97316, #fb923c); }
.btn-appeal {  background: linear-gradient(135deg, #0ea5e9, #22c55e); }
.btn:hover {
  transform: translateY(-4px);
  box-shadow: 0 26px 60px rgba(0, 0, 0, .85), 0 0 0 1px rgba(255, 255, 255, .09);
  filter: brightness(1.06);
}

.btn:active {
  transform: translateY(-1px) scale(.99);
  box-shadow: 0 16px 32px rgba(0, 0, 0, .75), 0 0 0 1px rgba(255, 255, 255, .08);
}

@media (max-width: 768px) {
  h1 {
    font-size: 1.6rem;
  }
  .btn {
    min-width: 200px;
    min-height: 100px;
    font-size: 1.5rem;
  }
}

/* ===== ФОРМА ЗВЕРНЕННЯ (appeal.html) ===== */

body.form-page {
  align-items: flex-start;
  justify-content: center;
  padding: 32px 16px;
  overflow-y: auto;
}

.form-wrapper {
  max-width: 900px;
  width: 100%;
  margin: 0 auto 32px;
  background: radial-gradient(circle at top, #16233a 0, #050814 60%, #020308 100%);
  border-radius: 28px;
  padding: 28px 32px 24px;
  box-shadow:
    0 40px 120px rgba(0, 0, 0, .9),
    0 0 0 1px rgba(148, 163, 184, .22);
  color: #e5e7eb;
}

.form-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  align-items: flex-start;
}

.form-header-title h1 {
  margin: 0 0 6px;
  font-size: 2rem;
}

.form-header-title p {
  margin: 0;
  font-size: .95rem;
  opacity: .8;
}

.form-header-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.form-back {
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, .6);
  font-size: .9rem;
  text-decoration: none;
  color: #e5e7eb;
  background: rgba(15, 23, 42, .9);
  box-shadow: 0 10px 24px rgba(15, 23, 42, .7);
}

.form-back:hover {
  background: rgba(15, 23, 42, 1);
}

.accessibility-toggle {
  border: 0;
  border-radius: 999px;
  padding: 9px 16px;
  font-size: .9rem;
  font-weight: 600;
  cursor: pointer;
  background: #facc15;
  color: #111827;
  box-shadow: 0 14px 30px rgba(250, 204, 21, .35);
}

.form-section-title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 10px;
  margin-top: 6px;
}

.form-grid {
  display: grid;
  gap: 10px;
}

.form-grid-3 {
  grid-template-columns: 1.4fr 1.1fr 1.2fr;
}

@media (max-width: 768px) {
  .form-wrapper {
    padding: 22px 18px 20px;
    border-radius: 20px;
  }
  .form-grid-3 {
    grid-template-columns: 1fr;
  }
}

/* Пухкі інпути/селекти форми */

.pill,
.selectlike {
  width: 100%;
  border: 1px solid rgba(148, 163, 184, .45);
  outline: none;
  background: rgba(15, 23, 42, .9);
  border-radius: 999px;
  padding: 11px 16px;
  font: inherit;
  color: #e5e7eb;
  box-shadow: inset 0 0 0 1px transparent;
  transition: .15s box-shadow, .15s background-color, .15s border-color;
}

.pill::placeholder,
.selectlike::placeholder {
  color: rgba(148, 163, 184, .9);
}

.pill:focus,
.selectlike:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 1px rgba(59, 130, 246, .6), 0 0 0 1px rgba(15, 23, 42, 1);
}

/* Автокомпліт (місто/вулиця) */

.selectwrap {
  position: relative;
}

.chev {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  opacity: .5;
  color: #9ca3af;
}

.sugg {
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  margin-top: 6px;
  background: rgba(15, 23, 42, .98);
  border-radius: 16px;
  border: 1px solid rgba(55, 65, 81, .9);
  box-shadow: 0 24px 60px rgba(15, 23, 42, .9);
  overflow: hidden;
  max-height: 260px;
  overflow-y: auto;
  display: none;
  z-index: 50;
}

.sugg.open {
  display: block;
}

.opt {
  padding: 9px 13px;
  cursor: pointer;
  font-size: .95rem;
}

.opt:hover,
.opt[aria-selected="true"] {
  background: rgba(30, 64, 175, .75);
}

.note {
  font-size: .8rem;
  color: rgba(148, 163, 184, .9);
  margin-top: 4px;
}

/* SMS блок */

.sms-block {
  margin-top: 18px;
  padding-top: 10px;
}

.sms-block-title {
  font-size: .9rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.sms-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.sms-input {
  max-width: 120px;
  text-align: center;
  letter-spacing: .15em;
}

.btn-sms {
  border-radius: 999px;
  border: 0;
  padding: 9px 16px;
  font-size: .9rem;
  font-weight: 600;
  cursor: pointer;
  background: #1d4ed8;
  color: #e5e7eb;
  box-shadow: 0 12px 28px rgba(37, 99, 235, .6);
}

.btn-sms:hover {
  background: #1e40af;
}

.sms-status {
  margin-top: 4px;
  font-size: .8rem;
  color: rgba(148, 163, 184, .95);
}

/* Текстове поле «Зміст звернення» */

.textarea-pill {
  width: 100%;
  min-height: 160px;
  border-radius: 22px;
  border: 1px solid rgba(148, 163, 184, .45);
  padding: 12px 16px;
  resize: vertical;
  background: rgba(15, 23, 42, .9);
  color: #e5e7eb;
  font: inherit;
}

.textarea-pill::placeholder {
  color: rgba(148, 163, 184, .9);
}

.textarea-pill:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 1px rgba(59, 130, 246, .6), 0 0 0 1px rgba(15, 23, 42, 1);
}

.form-footer-note {
  margin-top: 6px;
  font-size: .8rem;
  color: rgba(148, 163, 184, .9);
}

/* Кнопки внизу форми */

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
}

.btn-form {
  border-radius: 999px;
  padding: 10px 18px;
  font-size: .95rem;
  cursor: pointer;
  border: 1px solid rgba(148, 163, 184, .6);
  background: rgba(15, 23, 42, .9);
  color: #e5e7eb;
}

.btn-form.primary {
  background: #111827;
  border-color: #111827;
  color: #f9fafb;
  box-shadow: 0 14px 35px rgba(0, 0, 0, .8);
}

.btn-form:hover {
  filter: brightness(1.05);
}

/* ===== ТОСТИ ===== */

.toast-container {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  min-width: 260px;
  max-width: 420px;
  padding: 12px 14px;
  border-radius: 12px;
  font-size: .95rem;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .45);
  display: flex;
  align-items: flex-start;
  gap: 8px;
  pointer-events: auto;
}

.toast--info    { background: rgba(15, 23, 42, .96);   color: #e5e7eb; }
.toast--error   { background: rgba(127, 29, 29, .96);  color: #fee2e2; }
.toast--success { background: rgba(22, 101, 52, .96);  color: #dcfce7; }

.toast-close {
  margin-left: auto;
  background: transparent;
  border: 0;
  color: inherit;
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
}

/* ===== ВИСОКОКОНТРАСТНИЙ РЕЖИМ ===== */

body.form-page.high-contrast {
  background: #f3f4f6;
  color: #111827;
}

body.form-page.high-contrast .form-wrapper {
  background: #ffffff;
  color: #111827;
  box-shadow:
    0 20px 40px rgba(15, 23, 42, .25),
    0 0 0 1px #e5e7eb;
}

body.form-page.high-contrast .pill,
body.form-page.high-contrast .selectlike,
body.form-page.high-contrast .textarea-pill {
  background: #ffffff;
  color: #111827;
  border-color: #d1d5db;
}

body.form-page.high-contrast .sugg {
  background: #ffffff;
  color: #111827;
  border-color: #d1d5db;
}

body.form-page.high-contrast .opt:hover,
body.form-page.high-contrast .opt[aria-selected="true"] {
  background: #e5e7eb;
}

body.form-page.high-contrast .btn-sms,
body.form-page.high-contrast .btn-form.primary {
  box-shadow: none;
}

body.form-page.high-contrast .form-back {
  background: #ffffff;
  color: #111827;
}

