/* ВЕДАН — формы заявок lasergu.ru.
   Все правила под корнем .vl и с префиксом vl-: наши стили наружу не выходят,
   а типовые правила сайта (Bootstrap 3, intec.universe) для полей, кнопок и
   подписей внутри перебиваются более точными селекторами. Полной изоляции от
   чужого каскада это не даёт — проверять на живой странице.
   Фирменный оранжевый #FF6B01 — только для «лазерных» акцентов. У кнопки фон
   темнее, #C24E00: белый текст на нём даёт 4.79:1 (WCAG AA), на #FF6B01 было
   бы около 3:1. */

.vl, .vl *, .vl *::before, .vl *::after { box-sizing: border-box; }
.vl { font-family: "Open Sans", Arial, sans-serif; font-size: 15px; line-height: 1.45; color: #333; text-align: left; letter-spacing: normal; -webkit-font-smoothing: antialiased; }
.vl p, .vl form, .vl h2 { margin: 0; padding: 0; }
.vl input, .vl textarea, .vl button { font: inherit; color: inherit; margin: 0; text-transform: none; letter-spacing: normal; }
.vl button { background: none; border: 0; padding: 0; box-shadow: none; cursor: pointer; }
.vl a { color: #B34700; text-decoration: underline; }
.vl a:hover { color: #8F3900; }
.vl a:focus-visible, .vl button:focus-visible { outline: 2px solid #C24E00; outline-offset: 2px; }

/* --- окно ------------------------------------------------------------------ */
.vl-overlay { position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 10050; display: flex; align-items: center; justify-content: center; padding: 16px; overflow-y: auto; background: rgba(24, 22, 20, .58); }
.vl-overlay[hidden] { display: none; }
.vl-dialog { position: relative; width: 100%; max-width: 440px; margin: auto; padding: 30px 28px 24px; background: #fff; border-radius: 8px; box-shadow: 0 24px 64px rgba(0, 0, 0, .28); overflow: hidden; animation: vl-appear .22s ease-out; }
.vl-dialog:focus { outline: none; }

/* Линия реза: при открытии прочерчивается по верхнему краю окна, а по ней
   бежит горящая точка фокуса и гаснет в конце. */
.vl-dialog::before { content: ""; position: absolute; top: 0; left: 0; width: 100%; height: 3px; background: linear-gradient(90deg, rgba(255, 107, 1, .18), #FF6B01 72%, #FFB27A); transform-origin: left center; animation: vl-cut 1s cubic-bezier(.65, 0, .35, 1) both; pointer-events: none; }
.vl-dialog::after { content: ""; position: absolute; top: -3px; left: 100%; width: 9px; height: 9px; margin-left: -5px; border-radius: 50%; background: #FFE8D6; box-shadow: 0 0 6px 2px #FF6B01, 0 0 18px 5px rgba(255, 107, 1, .55); opacity: 0; animation: vl-spark 1s cubic-bezier(.65, 0, .35, 1) both; pointer-events: none; }
@keyframes vl-cut { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes vl-spark { 0% { left: 0; opacity: 1; } 85% { opacity: 1; } 100% { left: 100%; opacity: 0; } }
/* Появление — только сдвигом, без прозрачности: где анимации притормаживают
   (фоновая вкладка, слабый телефон), окно не должно застыть бледным. */
@keyframes vl-appear { from { transform: translateY(10px); } to { transform: none; } }

.vl .vl-close { position: absolute; top: 10px; right: 10px; z-index: 2; display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 50%; color: #5f5f5f; }
.vl .vl-close:hover { color: #222; background: #f2f2f2; }
.vl-close svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }

/* --- шапка формы ----------------------------------------------------------- */
.vl .vl-title { margin: 0 34px 0 0; font-size: 22px; line-height: 1.25; font-weight: 600; color: #222; overflow-wrap: anywhere; }
/* Траектория реза под заголовком: пунктир и точка фокуса. */
.vl-kerf { display: block; width: 132px; height: 8px; margin: 10px 0 12px; overflow: visible; }
.vl-kerf line { stroke: #FF6B01; stroke-width: 1.5; stroke-dasharray: 6 5; opacity: .8; }
.vl-kerf circle { fill: #FF6B01; filter: drop-shadow(0 0 3px rgba(255, 107, 1, .9)); }
.vl .vl-lead { margin: 0 0 18px; font-size: 14px; color: #5f5f5f; }

/* --- поля ------------------------------------------------------------------ */
.vl-field { min-width: 0; margin: 0 0 14px; }
.vl .vl-label { display: block; max-width: none; margin: 0 0 6px; font-size: 13px; font-weight: 600; line-height: 1.35; color: #333; }
.vl-req { margin-left: 2px; color: #B34700; }
.vl .vl-input { display: block; width: 100%; height: auto; min-height: 44px; padding: 10px 12px; font-size: 15px; line-height: 1.4; color: #222; background: #fff; border: 1px solid #8c8c8c; border-radius: 4px; box-shadow: none; outline: none; transition: border-color .15s, box-shadow .2s; -webkit-appearance: none; appearance: none; }
.vl textarea.vl-input { min-height: 96px; resize: vertical; }
.vl .vl-input::placeholder { color: #767676; opacity: 1; }
/* Луч под полем в фокусе. */
.vl .vl-input:focus { border-color: #C24E00; box-shadow: 0 2px 0 0 #FF6B01, 0 12px 18px -12px rgba(255, 107, 1, .95); }
.vl .vl-input[aria-invalid="true"] { border-color: #B3261E; box-shadow: 0 0 0 1px #B3261E; }
/* У поля с ошибкой фокус тоже должен быть заметен: красная рамка плюс луч. */
.vl .vl-input[aria-invalid="true"]:focus { border-color: #B3261E; box-shadow: 0 0 0 1px #B3261E, 0 4px 0 0 #FF6B01; }
.vl-error { display: block; margin-top: 5px; font-size: 12.5px; line-height: 1.35; color: #B3261E; }
.vl-error:empty { display: none; }

.vl-consent { display: flex; align-items: flex-start; gap: 10px; margin-top: 4px; }
.vl .vl-consent input[type="checkbox"] { position: static; display: inline-block; visibility: visible; flex: none; width: 18px; height: 18px; margin: 2px 0 0; opacity: 1; -webkit-appearance: checkbox; appearance: auto; accent-color: #C24E00; cursor: pointer; }
.vl .vl-consent label { margin: 0; font-size: 13px; font-weight: 400; line-height: 1.45; color: #555; cursor: pointer; }
.vl-field--consent { margin-bottom: 18px; }

/* --- кнопка ---------------------------------------------------------------- */
.vl .vl-submit { position: relative; display: flex; align-items: center; justify-content: center; width: 100%; min-height: 48px; padding: 12px 20px; overflow: hidden; font-size: 16px; font-weight: 600; line-height: 1.2; color: #fff; background: #C24E00; border-radius: 4px; transition: background-color .15s; }
.vl .vl-submit:hover { background: #A84300; }
.vl .vl-submit:disabled { color: #fff; opacity: 1; }
/* Луч: узкий блик пробегает по кнопке при наведении и бежит всё время отправки.
   Блик полупрозрачный — белый текст кнопки под ним остаётся читаемым. */
.vl-submit::after { content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: 34%; background: linear-gradient(90deg, transparent, rgba(255, 220, 190, .18) 42%, rgba(255, 255, 255, .34) 50%, rgba(255, 220, 190, .18) 58%, transparent); transform: translateX(-120%) skewX(-18deg); pointer-events: none; }
.vl-submit:hover::after { animation: vl-beam .75s ease-in-out; }
.vl .vl-form[data-vl-state="sending"] .vl-submit { cursor: progress; background: #A84300; }
.vl-form[data-vl-state="sending"] .vl-submit::after { animation: vl-beam 1.1s linear infinite; }
@keyframes vl-beam { from { transform: translateX(-120%) skewX(-18deg); } to { transform: translateX(310%) skewX(-18deg); } }

/* --- ответ и успех --------------------------------------------------------- */
.vl-answer { margin-top: 12px; font-size: 13.5px; line-height: 1.45; color: #5f5f5f; }
.vl-answer:empty { display: none; }
.vl-form[data-vl-state="error"] .vl-answer { color: #B3261E; }
.vl .vl-answer a { font-weight: 600; white-space: nowrap; }

.vl-success { display: none; padding: 20px 0 6px; text-align: center; }
.vl-success:focus { outline: none; }
.vl-form[data-vl-state="success"] .vl-body { display: none; }
.vl-form[data-vl-state="success"] .vl-success { display: block; }
.vl-check { display: block; width: 64px; height: 64px; margin: 0 auto 12px; overflow: visible; }
.vl-check circle { fill: none; stroke: #FFE3CC; stroke-width: 3; }
/* Галочка «прорезается» штрихом. Без анимации она видна сразу: начальное
   положение задаёт сама анимация, а не основное правило. */
.vl-check path { fill: none; stroke: #C24E00; stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 48; stroke-dashoffset: 0; }
.vl-form[data-vl-state="success"] .vl-check path { animation: vl-draw .6s .1s ease-out backwards; }
@keyframes vl-draw { from { stroke-dashoffset: 48; } to { stroke-dashoffset: 0; } }
.vl .vl-success-title { margin: 0 0 4px; font-size: 20px; font-weight: 600; color: #222; }
.vl .vl-success-text { font-size: 14px; color: #5f5f5f; }

/* --- консультация: две колонки, слева станок ------------------------------ */
.vl .vl-dialog--wide { display: grid; grid-template-columns: minmax(180px, 250px) minmax(0, 1fr); max-width: 760px; padding: 0; }
.vl-product { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; min-width: 0; padding: 36px 22px; text-align: center; background: #f6f4f1; border-right: 1px solid #ece8e3; }
.vl-product-tag { font-size: 11.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: #6b6b6b; }
.vl-product-pic { display: block; width: 100%; max-width: 200px; height: 150px; object-fit: contain; mix-blend-mode: multiply; }
.vl-product-pic[hidden] { display: none; }
.vl .vl-product-name { max-width: 100%; margin: 0; font-size: 14px; font-weight: 600; line-height: 1.35; color: #333; overflow-wrap: anywhere; }
.vl-main { position: relative; min-width: 0; padding: 30px 28px 24px; }
.vl-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 14px; }
.vl-field--full { grid-column: 1 / -1; }

/* --- телефон: нижний лист ------------------------------------------------- */
@media (max-width: 600px) {
  .vl-overlay { align-items: flex-end; padding: 0; }
  .vl-dialog { max-width: none; max-height: 92vh; max-height: 92dvh; margin: 0; padding: 26px 18px 20px; padding-bottom: max(20px, env(safe-area-inset-bottom)); overflow-y: auto; border-radius: 14px 14px 0 0; animation-name: vl-sheet; }
  .vl .vl-dialog--wide { display: block; padding: 0; }
  .vl-product { flex-direction: row; justify-content: flex-start; gap: 12px; padding: 16px 56px 14px 18px; text-align: left; border-right: 0; border-bottom: 1px solid #ece8e3; }
  .vl-product-tag { display: none; }
  .vl-product-pic { flex: none; width: 64px; max-width: 64px; height: 48px; }
  .vl-main { padding: 20px 18px; padding-bottom: max(20px, env(safe-area-inset-bottom)); }
  .vl-grid { grid-template-columns: minmax(0, 1fr); }
  .vl .vl-title { font-size: 20px; }
}
/* Сдвиг небольшой: если анимация застынет на первом кадре (замечено в фоновой
   вкладке), низ листа с кнопкой не должен уехать за край экрана. */
@keyframes vl-sheet { from { transform: translateY(12px); } to { transform: none; } }

/* Кто просит меньше движения — без анимаций вовсе. !important нужен: у линии
   реза, луча и галочки анимация задана селекторами состояний, которые
   специфичнее этого блока, а уважать настройку человека надо безусловно. */
@media (prefers-reduced-motion: reduce) {
  .vl *, .vl *::before, .vl *::after { animation: none !important; transition: none !important; }
  .vl-dialog::after { opacity: 0; }
}
