/* Joldas UI: form primitives (2025-10-07g) */

/* Страница формы: заголовок выровнен по карточке */
.form-page .page-title{ max-width:640px; margin:6px auto 12px !important }

/* Фикс ширины карточек + центрирование */
.form-card{ max-width:640px !important; width:100% !important; margin:32px auto 0 !important }
.result-card{ max-width:640px !important; width:100% !important; margin:28px auto 0 !important }
.result-card p{ margin-top:12px !important }

/* Вертикальные отступы */
.form{ display:grid !important; row-gap:20px !important }
.field{ display:grid !important; row-gap:8px !important }
.form-actions{ display:flex !important; justify-content:flex-end !important; gap:12px !important; margin-top:6px !important }
.seats-hint{ margin-left:8px !important }

/* Грид даты/времени */
.dt-grid{ display:grid !important; grid-template-columns:1fr !important; gap:12px !important }
@media (min-width:640px){ .dt-grid{ grid-template-columns:1fr 1fr !important } }

/* Фон-«свечение» */
.hero.hero--compact .row{ display:grid; grid-template-columns:1fr; gap:0; padding-block:clamp(20px,4.5vw,48px) !important }
.hero.hero--compact.form-hero .row{ padding-block:clamp(8px,3vw,24px) !important }

/* Попап подсказок — CSP-safe (без inline) */
:root{
  --pop-bg-light:#ffffff; --pop-brd-light:#e5e7eb; --pop-hov-light:rgba(0,0,0,.06);
  --pop-bg-dark:#111318;  --pop-brd-dark:#2a2f3a;  --pop-hov-dark:rgba(255,255,255,.08);
}
.suggest-wrap{ position:relative; display:block }
.suggest-pop{
  position:absolute; z-index:9999; top:calc(100% + 4px); left:0;
  width:max(260px,100%); max-height:320px; overflow:auto;
  background:var(--pop-bg-light); border:1px solid var(--pop-brd-light);
  border-radius:12px; box-shadow:0 16px 40px rgba(0,0,0,.25);
  color:#111111; display:none;
}
.suggest-pop.is-open{ display:block }
.suggest-option{
  display:block; padding:.55rem .75rem; cursor:pointer;
  font-size:14.5px; font-weight:600; color:#111111;
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
}
.suggest-option:hover, .suggest-option[aria-selected="true"]{
  background:var(--pop-hov-light);
}
@media (prefers-color-scheme: dark){
  .suggest-pop{ background:var(--pop-bg-dark); border-color:var(--pop-brd-dark); color:#e8eaed }
  .suggest-option{ color:#e8eaed }
  .suggest-option:hover, .suggest-option[aria-selected="true"]{
    background:var(--pop-hov-dark);
  }
}

/* Иконки в инпутах даты/времени */
#depart_date.input,#depart_time.input{
  background-repeat:no-repeat; background-position:right .8rem center;
  background-size:1.1rem 1.1rem; padding-right:2.4rem;
}
#depart_date.input{
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4.5' width='18' height='16' rx='2.5'/%3E%3Cpath d='M16 2.5v4M8 2.5v4M3 9.5h18'/%3E%3C/svg%3E");
}
#depart_time.input{
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 7v6l4 2'/%3E%3C/svg%3E");
}
@media (prefers-color-scheme: dark){
  #depart_date.input{
    background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='none' stroke='%23aab2be' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4.5' width='18' height='16' rx='2.5'/%3E%3Cpath d='M16 2.5v4M8 2.5v4M3 9.5h18'/%3E%3C/svg%3E");
  }
  #depart_time.input{
    background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='none' stroke='%23aab2be' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 7v6l4 2'/%3E%3C/svg%3E");
  }
}

/* Embed */
body.embed .site-header{ display:none !important }
body.embed main.wrap{ padding-top:0 !important }
