/* Единая визуальная система форм — по образцу страницы «Электрика». */
.work-form-modal,
.repair-form-modal,
.glass-task-modal,
.modal {
  --form-accent: #d8ff38;
  --form-accent-deep: #9fc51d;
  --form-ink: #121816;
  --form-text: #29332f;
  --form-muted: #5d6964;
  --form-line: #cad3d1;
  --form-surface: #f0f3f4;
  --form-font: Manrope, Arial, sans-serif;
  --form-display: Unbounded, Manrope, Arial, sans-serif;
}

.work-form-modal__backdrop,
.repair-form-modal__backdrop,
.glass-task-modal__backdrop,
.modal-backdrop {
  background:
    radial-gradient(circle at 50% 12%, rgba(216, 255, 56, 0.13), transparent 34%),
    rgba(7, 11, 9, 0.82);
  backdrop-filter: blur(14px) saturate(0.75);
}

.work-form-modal__dialog,
.repair-form-modal__dialog,
.glass-task-modal__dialog,
.modal-dialog {
  color: var(--form-ink);
  background:
    radial-gradient(circle at 92% 8%, rgba(216, 255, 56, 0.08), transparent 22%),
    linear-gradient(145deg, #f0f3f4 0%, #e4e9ea 58%, #dce3e4 100%);
  border: 1px solid rgba(255, 255, 255, 0.92);
  border-radius: 22px;
  box-shadow:
    0 42px 120px rgba(0, 0, 0, 0.48),
    0 14px 38px rgba(5, 12, 9, 0.2),
    0 0 0 1px rgba(20, 31, 25, 0.12),
    0 0 52px rgba(216, 255, 56, 0.08);
}

.work-form-modal__dialog::before,
.repair-form-modal__dialog::before,
.glass-task-modal__dialog::before,
.modal-dialog::before {
  content: "";
  position: absolute;
  z-index: 2;
  top: -1px;
  left: 24px;
  width: 150px;
  height: 4px;
  border-radius: 0 0 8px 8px;
  background: linear-gradient(90deg, var(--form-accent), #96c917);
  box-shadow: 0 5px 18px rgba(173, 224, 24, 0.34);
}

.work-form-modal__close,
.repair-form-modal__close,
.glass-task-modal__close,
.modal-close {
  border: 1px solid rgba(27, 39, 33, 0.14);
  background: rgba(249, 251, 251, 0.9);
  color: var(--form-ink);
  box-shadow: 0 8px 24px rgba(24, 34, 30, 0.12);
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.work-form-modal__close:hover,
.repair-form-modal__close:hover,
.glass-task-modal__close:hover,
.modal-close:hover {
  background: var(--form-accent);
  box-shadow: 0 9px 26px rgba(157, 198, 27, 0.3);
  transform: rotate(5deg) scale(1.04);
}

.work-form-modal__close:focus-visible,
.repair-form-modal__close:focus-visible,
.glass-task-modal__close:focus-visible,
.modal-close:focus-visible,
.compact-work-form button:focus-visible,
.repair-lead-form button:focus-visible,
.glass-task-form button:focus-visible,
.modal-form button:focus-visible {
  outline: 3px solid rgba(216, 255, 56, 0.72);
  outline-offset: 3px;
}

.work-form-modal__head .eyebrow,
.repair-form-modal__head .eyebrow,
.glass-task-modal__head .eyebrow,
.modal-dialog > .eyebrow {
  color: #66706b;
  font-family: var(--form-font);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.2em;
}

.work-form-modal__head .eyebrow span,
.repair-form-modal__head .eyebrow span,
.glass-task-modal__head .eyebrow span,
.modal-dialog > .eyebrow span {
  width: 34px;
  height: 3px;
  background: var(--form-accent-deep);
  box-shadow: 0 0 14px rgba(159, 197, 29, 0.35);
}

.work-form-modal__head h2,
.repair-form-modal__head h2,
.glass-task-modal__head h2,
.modal-dialog > h2 {
  color: var(--form-ink);
  font-family: var(--form-display);
  font-size: clamp(23px, 2.7vh, 34px);
  font-weight: 700;
  font-style: normal;
  letter-spacing: -1.6px;
  line-height: 1.05;
  text-transform: uppercase;
  text-wrap: balance;
}

.work-form-modal__head h2 em,
.repair-form-modal__head h2 em,
.glass-task-modal__head h2 em,
.modal-dialog > h2 em {
  color: #708c0b;
  font-style: normal;
}

.work-form-modal__head > p:last-child,
.repair-form-modal__head > p:last-child,
.glass-task-modal__head > p:last-child,
.modal-dialog > p:not(.eyebrow) {
  color: var(--form-muted);
  font-family: var(--form-font);
  font-weight: 550;
}

.compact-work-form,
.repair-lead-form,
.glass-task-form {
  box-sizing: border-box;
  margin: 0 clamp(12px, 2.4vw, 24px) clamp(12px, 2vh, 22px);
  padding: clamp(10px, 1.5vh, 18px);
  background: linear-gradient(155deg, rgba(251, 252, 252, 0.98), rgba(241, 245, 245, 0.97));
  border: 1px solid rgba(255, 255, 255, 0.95);
  border-radius: 16px;
  box-shadow:
    0 18px 42px rgba(27, 40, 34, 0.11),
    inset 0 0 0 1px rgba(36, 52, 44, 0.055);
}

.modal-form {
  box-sizing: border-box;
  padding: 16px;
  background: linear-gradient(155deg, rgba(251, 252, 252, 0.98), rgba(241, 245, 245, 0.97));
  border: 1px solid rgba(255, 255, 255, 0.95);
  border-radius: 14px;
  box-shadow:
    0 16px 36px rgba(27, 40, 34, 0.1),
    inset 0 0 0 1px rgba(36, 52, 44, 0.055);
}

.work-field > span,
.work-choice-set legend,
.repair-field > span,
.repair-work-set legend,
.glass-task-field > span,
.glass-task-set legend,
.modal-form .field-label {
  color: var(--form-text);
  font-family: var(--form-font);
  font-weight: 850;
  letter-spacing: 0.075em;
}

.work-field small,
.work-choice-set small,
.repair-field small,
.repair-work-set small,
.glass-task-field small,
.glass-task-set small,
.modal-form .field-label small {
  color: #7d8883;
  opacity: 1;
  font-family: var(--form-font);
  font-weight: 550;
}

.work-field input,
.work-field select,
.work-field textarea,
.repair-field input,
.repair-field select,
.repair-field textarea,
.glass-task-field input,
.glass-task-field select,
.glass-task-field textarea,
.modal-form > input,
.modal-form > textarea {
  border: 1px solid var(--form-line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--form-ink);
  font-family: var(--form-font);
  box-shadow:
    0 4px 12px rgba(28, 43, 36, 0.055),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.modal-form > input,
.modal-form > textarea {
  min-height: 44px;
  padding: 9px 12px;
}

.work-field input::placeholder,
.work-field textarea::placeholder,
.repair-field input::placeholder,
.repair-field textarea::placeholder,
.glass-task-field input::placeholder,
.glass-task-field textarea::placeholder,
.modal-form > input::placeholder,
.modal-form > textarea::placeholder {
  color: #8a9490;
  opacity: 1;
}

.work-field input:hover,
.work-field select:hover,
.work-field textarea:hover,
.repair-field input:hover,
.repair-field select:hover,
.repair-field textarea:hover,
.glass-task-field input:hover,
.glass-task-field select:hover,
.glass-task-field textarea:hover,
.modal-form > input:hover,
.modal-form > textarea:hover {
  border-color: #aebbb7;
  background: #fff;
}

.work-field input:focus,
.work-field select:focus,
.work-field textarea:focus,
.repair-field input:focus,
.repair-field select:focus,
.repair-field textarea:focus,
.glass-task-field input:focus,
.glass-task-field select:focus,
.glass-task-field textarea:focus,
.modal-form > input:focus,
.modal-form > textarea:focus {
  border-color: var(--form-accent-deep);
  background: #fff;
  outline: none;
  box-shadow:
    0 0 0 4px rgba(184, 224, 36, 0.16),
      0 8px 20px rgba(45, 63, 54, 0.09);
}

.work-field input:user-invalid,
.work-field select:user-invalid,
.repair-field input:user-invalid,
.repair-field select:user-invalid,
.glass-task-field input:user-invalid,
.glass-task-field select:user-invalid,
.modal-form > input:user-invalid {
  border-color: #b75b52;
  box-shadow: 0 0 0 4px rgba(183, 91, 82, 0.12);
}

.work-choice-grid label,
.repair-work-grid label,
.glass-task-choices label,
.choice-grid span {
  position: relative;
  border: 1px solid #d0d8d6;
  border-radius: 10px;
  background: linear-gradient(145deg, #fff, #f3f6f6);
  color: var(--form-text);
  font-family: var(--form-font);
  box-shadow:
    0 5px 13px rgba(24, 38, 31, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.work-choice-grid label:hover,
.repair-work-grid label:hover,
.glass-task-choices label:hover,
.choice-grid label:hover span {
  border-color: #aeba9c;
  background: #fff;
  box-shadow: 0 8px 20px rgba(36, 52, 44, 0.11);
  transform: translateY(-1px);
}

.work-choice-grid label:has(input:checked),
.repair-work-grid label:has(input:checked),
.glass-task-choices label:has(input:checked),
.choice-grid input:checked + span {
  border-color: #9dbd26;
  background: linear-gradient(145deg, #f7ffdb, #eaf8b5);
  color: var(--form-ink);
  box-shadow:
    0 0 0 2px rgba(190, 229, 52, 0.18),
    0 8px 20px rgba(105, 132, 20, 0.14);
}

.work-choice-grid input,
.repair-work-grid input,
.glass-task-choices input,
.work-form-consent input,
.repair-form-consent input,
.glass-task-consent input,
.modal-form input[type="checkbox"],
.modal-form input[type="radio"] {
  accent-color: #94b71a;
}

.work-choice-grid span,
.repair-work-grid span,
.glass-task-choices span {
  color: var(--form-text);
  font-weight: 650;
}

.work-form-consent,
.repair-form-consent,
.glass-task-consent,
.modal-form .consent {
  color: var(--form-muted);
  font-family: var(--form-font);
  font-weight: 550;
}

.work-form-progress span,
.repair-form-progress span,
.glass-task-progress span {
  border-radius: 999px;
  background: rgba(27, 39, 33, 0.13);
}

.work-form-progress span.is-active,
.repair-form-progress span.is-active,
.glass-task-progress span.is-active {
  background: linear-gradient(90deg, var(--form-accent), var(--form-accent-deep));
  box-shadow: 0 0 12px rgba(159, 197, 29, 0.28);
}

.compact-work-form .button,
.repair-lead-form .button,
.glass-task-form .button,
.modal-form .button {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  background: linear-gradient(135deg, #0f1613, #26312c);
  color: #fff;
  font-family: var(--form-font);
  font-weight: 850;
  letter-spacing: 0.015em;
  box-shadow:
    0 14px 28px rgba(8, 15, 11, 0.25),
    0 0 0 1px rgba(15, 23, 19, 0.2),
    0 0 24px rgba(202, 247, 49, 0.08);
}

.compact-work-form .button span,
.repair-lead-form .button span,
.glass-task-form .button span,
.modal-form .button span {
  color: var(--form-accent);
}

.compact-work-form .button:hover,
.repair-lead-form .button:hover,
.glass-task-form .button:hover,
.modal-form .button:hover {
  background: linear-gradient(135deg, #1a241f, #344039);
  box-shadow:
    0 16px 34px rgba(8, 15, 11, 0.3),
    0 0 0 2px rgba(216, 255, 56, 0.18),
    0 0 32px rgba(202, 247, 49, 0.12);
}

.work-form-back,
.repair-form-back,
.glass-task-back {
  border-radius: 8px;
  color: #42504a;
  transition: color 0.18s ease, background 0.18s ease;
}

.work-form-back:hover,
.repair-form-back:hover,
.glass-task-back:hover {
  background: rgba(27, 39, 33, 0.07);
  color: var(--form-ink);
}

.compact-work-form .form-status,
.repair-lead-form .form-status,
.glass-task-form .form-status,
.modal-form .form-status {
  color: #617e19;
  font-family: var(--form-font);
  font-weight: 650;
}

.modal-dialog {
  padding: 38px;
}

.modal-dialog .service-choice {
  margin-bottom: 18px;
  padding: 12px;
  border: 1px solid #d0d8d6;
  border-radius: 12px;
  background: rgba(235, 240, 239, 0.78);
}

@media (min-width: 761px) {
  .work-form-modal__dialog,
  .glass-task-modal__dialog {
    height: min(660px, calc(100dvh - 24px));
    max-height: calc(100dvh - 24px);
  }

  .repair-form-modal__dialog {
    height: min(700px, calc(100dvh - 24px));
    max-height: calc(100dvh - 24px);
  }
}

@media (max-width: 900px) {
  .work-form-modal__dialog,
  .repair-form-modal__dialog,
  .glass-task-modal__dialog,
  .modal-dialog {
    border-radius: 16px;
  }
}

@media (max-width: 760px) {
  .work-form-modal__dialog,
  .repair-form-modal__dialog,
  .glass-task-modal__dialog {
    border-radius: 0;
    background: linear-gradient(155deg, #eef2f3, #dde4e5);
  }

  .compact-work-form,
  .repair-lead-form,
  .glass-task-form {
    margin: 0 8px 8px;
    padding: clamp(7px, 1vh, 11px);
    border-radius: 12px;
    box-shadow:
      0 10px 26px rgba(27, 40, 34, 0.09),
      inset 0 0 0 1px rgba(36, 52, 44, 0.05);
  }

  .work-form-modal__dialog::before,
  .repair-form-modal__dialog::before,
  .glass-task-modal__dialog::before,
  .modal-dialog::before {
    left: 9px;
    width: 112px;
    height: 3px;
  }

  .work-form-modal__head h2,
  .repair-form-modal__head h2,
  .glass-task-modal__head h2 {
    font-size: clamp(18px, 3.1vh, 26px);
    letter-spacing: -1px;
  }

  .work-field input,
  .work-field select,
  .work-field textarea,
  .repair-field input,
  .repair-field select,
  .repair-field textarea,
  .glass-task-field input,
  .glass-task-field select,
  .glass-task-field textarea,
  .work-choice-grid label,
  .repair-work-grid label,
  .glass-task-choices label {
    border-radius: 7px;
  }

  .work-choice-grid label:hover,
  .repair-work-grid label:hover,
  .glass-task-choices label:hover,
  .choice-grid label:hover span {
    transform: none;
  }

  .compact-work-form .button,
  .repair-lead-form .button,
  .glass-task-form .button,
  .modal-form .button {
    border-radius: 8px;
    box-shadow: 0 9px 22px rgba(8, 15, 11, 0.22);
  }

  .modal-dialog {
    padding: 30px 18px 20px;
    border-radius: 16px;
  }

  .modal-form {
    padding: 12px;
    border-radius: 11px;
  }
}

@media (max-width: 420px) {
  .work-form-modal__head .eyebrow,
  .repair-form-modal__head .eyebrow,
  .glass-task-modal__head .eyebrow {
    font-size: 9px;
  }

  .modal-dialog > h2 {
    font-size: 24px;
  }

  .modal-dialog {
    width: calc(100% - 12px);
    max-height: calc(100dvh - 12px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .work-form-modal__close,
  .repair-form-modal__close,
  .glass-task-modal__close,
  .modal-close,
  .work-choice-grid label,
  .repair-work-grid label,
  .glass-task-choices label,
  .choice-grid span {
    transition: none;
  }
}
