/* Shared public forms and decision prompts. */
.privacy-notice, .agency-dialog, .trip-guide, .guide-invite {
  --dialog-ink: #253027;
  --dialog-rule: #d6daca;
  --dialog-paper: #fffef9;
  color: var(--dialog-ink);
  font: 460 1rem/1.45 "Golos Text", Arial, sans-serif;
}
:is(.privacy-notice,.agency-dialog,.trip-guide):not([open]), .guide-invite [hidden], .trip-guide [hidden], .privacy-notice [hidden] { display:none !important; }
:where(.privacy-notice,.trip-guide,.agency-dialog,.guide-invite) :is(a,button):focus-visible {
  outline: 3px solid #96510e;
  outline-offset: 2px;
}
:is(.privacy-notice,.trip-guide,.agency-dialog,.guide-invite) button { font-family: inherit; cursor: pointer; }
.dialog-dismiss {
  display:grid; place-items:center; flex:none; width:44px; height:44px; padding:0;
  border:1px solid #c5ccba; border-radius:50%; background:#fffefa; color:#2d382b;
}
.dialog-dismiss:hover { background:#eef2e4; }
.dialog-dismiss svg { width:20px; height:20px; }
.privacy-inner { position:relative; display:grid; gap:22px; padding:30px; }
.privacy-copy h2 { margin:0;color:inherit;font:650 1.1rem/1.2 "Golos Text",Arial,sans-serif;letter-spacing:-.025em; }
.privacy-copy p { margin:4px 0 0; line-height:1.4; font-size:.94rem; color:#495444; }
.privacy-copy a { color:#315537; text-underline-offset:3px; }
.privacy-choices { display:flex; gap:8px; flex:none; }
.privacy-choices button {
  padding:8px 14px; min-height:44px; border:1px solid #aaba9b; border-radius:9px;
  color:#293c25; background:#fffef9; font-size:.94rem; font-weight:600; line-height:1.25;
}
.privacy-choices button:hover { background:#e4f0d7; border-color:#859976; }
.privacy-notice:modal {
  position:fixed; inset:0; box-sizing:border-box; width:min(490px,calc(100% - 32px)); max-width:none;
  max-height:calc(100dvh - 32px); margin:auto; padding:0; overflow:auto; overscroll-behavior:contain;
  background:var(--dialog-paper); border:1px solid var(--dialog-rule); border-radius:20px; box-shadow:0 16px 56px #17291b30;
}
.privacy-notice h2 { padding-right:40px; font-size:1.65rem; }
.privacy-notice h2:focus { outline:none; }
.privacy-notice .privacy-copy p { margin-top:12px; }
.privacy-notice .privacy-close { position:absolute; top:12px; right:12px; }
.privacy-choices [data-cookie-analytics] { background:#d6f0b7; border-color:#accc91; }
.privacy-choices [data-cookie-analytics]:hover { background:#c9e8a6; }
.privacy-current { font-weight:600; }
:is(.trip-guide,.agency-dialog,.privacy-notice)::backdrop { background:rgb(21 29 23 / .47); }
body:has(.destination-search[data-list-open], .agency-menu[open]) #vk_community_messages { visibility:hidden!important; }
html:has(:is(.trip-guide,.privacy-notice):modal) { overflow-y:hidden; }

.guide-invite.home-wrap {
  display:grid; grid-template-columns:1fr auto; align-items:center; gap:8px 20px;
  margin-block:14px 0; padding:10px 18px; background:#eef3e5; border-radius:14px;
}
.guide-invite h2 { margin:0; font:630 clamp(1.1rem,1.65vw,1.55rem)/1.18 "Golos Text",Arial,sans-serif; letter-spacing:-.04em; }
.guide-invite p { display:none; max-width:48ch; margin:6px 0 0; line-height:1.4; color:#46553f; }
.guide-invite .invite-action, .guide-adviser {
  display:inline-flex; justify-content:center; align-items:center; gap:10px; min-height:44px; padding:10px 15px;
  font-weight:620; line-height:1.22; text-decoration:none; border-radius:10px; color:#243022; background:#c5e89e;
}
.invite-action:hover,.guide-adviser:hover { background:#b5e186; }
.invite-action svg,.guide-adviser svg { width:18px;height:18px;flex:none; }
.invite-postcards { display:none; position:relative; width:104px; height:76px; }
.invite-postcards img { width:73px; height:56px; object-fit:cover; position:absolute; box-sizing:border-box; padding:3px 3px 7px; background:#fff; box-shadow:0 2px 6px #29362933; }
.invite-postcards img:first-child { left:3px; top:3px; transform:rotate(-10deg); }
.invite-postcards img:last-child { right:1px; bottom:3px; transform:rotate(8deg); }
.guide-invite.is-expanded { grid-template-columns:auto 1fr auto auto; padding:16px 18px; }
.is-expanded .invite-postcards, .guide-invite.is-expanded p { display:block; }
.guide-invite .dialog-dismiss { background:transparent; border-color:transparent; }
.guide-invite .dialog-dismiss:hover { background:#dce9d4; }
.trip-guide {
  width:min(738px,calc(100% - 32px)); max-width:none; max-height:calc(100dvh - 32px); padding:0; margin:auto;
  background:#fffdf7; border:0; border-radius:22px; overflow:auto; overscroll-behavior:contain;
}
.guide-shell { display:grid; grid-template-columns:minmax(160px,.68fr) minmax(0,1.32fr); }
.guide-cover { position:relative; background:#d0deca; overflow:hidden; }
.guide-cover img { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; object-position:55% center; }
.dialog-bar {
  display:flex; justify-content:space-between; gap:12px; align-items:center; padding:12px 18px;
  background:var(--dialog-paper); border-bottom:1px solid var(--dialog-rule);
}
.dialog-bar > span { display:inline-flex; gap:8px; align-items:center; font-size:.94rem; font-weight:580; color:#43513f; }
.dialog-bar > span svg { width:18px; height:18px; }
.guide-page,.dialog-body { padding:clamp(20px,3vw,34px); }
.guide-page h2,.agency-dialog .dialog-body h2 {
  margin:0; max-width:22ch; color:var(--dialog-ink); font:650 clamp(1.6rem,3vw,2.15rem)/1.08 "Golos Text",Arial,sans-serif;
  letter-spacing:-.05em; text-wrap:balance;
}
.guide-page h2:focus { outline:none; }
.guide-page p,.agency-dialog .dialog-body > p { margin:10px 0 18px; color:#4c574c; font-size:1rem; line-height:1.45; }
.guide-options,.guide-results { border-top:1px solid var(--dialog-rule); }
.guide-options button, .guide-results a {
  width:100%; display:flex; align-items:center; justify-content:space-between; gap:12px; min-height:52px;
  padding:12px 2px; text-align:left; font-size:1.04rem; font-weight:600; color:var(--dialog-ink); background:none;
  border:0; border-radius:0; border-bottom:1px solid var(--dialog-rule); text-decoration:none;
}
.guide-results small { display:block; color:#535e50; line-height:1.35; font-size:.9rem; font-weight:450; }
.guide-options svg,.guide-results svg { width:18px;height:18px;flex:none; }
.guide-options button:hover,.guide-results a:hover { color:#93420a; }
.guide-adviser { margin-top:20px; }
.guide-back { padding:4px 0; min-height:44px; background:none; border:0; color:#43573a; font-size:.95rem; }
.agency-dialog[open] { inset:0; width:100%; height:100%; max-width:none; max-height:none; margin:0; padding:16px; border:0; background:transparent; }
.agency-dialog .modal-backdrop { background:transparent; backdrop-filter:none; }
.agency-dialog .modal-card {
  display:flex; flex-direction:column; overflow:hidden; width:min(510px,100%);
  padding:0; border:0; border-radius:20px; background:var(--dialog-paper); box-shadow:0 12px 60px #1b2a2129;
  max-height:calc(100dvh - 32px); transform:none;
}
.agency-dialog .modal-card .dialog-bar { flex:none; }
.agency-dialog .dialog-body { min-height:0; overflow:auto; overscroll-behavior:contain; }
.agency-dialog form:is(.compare-form,.lead-form) { display:grid; gap:13px; padding:0!important; margin:0; background:none; border:0; border-radius:0; box-shadow:none; }
.agency-dialog form label:not(.consent) { display:grid; gap:5px; min-width:0; }
.agency-dialog form label > span:first-child { color:#31402f; font:600 .96rem/1.3 "Golos Text",Arial,sans-serif; }
.agency-dialog form label em { font-size:.84rem; color:#52614e; font-weight:450; }
.agency-dialog form :is(input:not([type="hidden"],[type="checkbox"],.hp-field),textarea) {
  box-sizing:border-box; width:100%; min-height:46px; min-width:0; border:1px solid #a8b79c; border-radius:9px;
  box-shadow:none; background:white; color:#23301f; padding:10px 11px; font:450 1rem/1.35 "Golos Text",Arial,sans-serif;
}
.agency-dialog form input[type="file"] { padding:6px; font-size:.9rem; }
.agency-dialog input::file-selector-button { border:0; background:#e7efde; border-radius:6px; padding:7px; color:#2e4429; font:inherit; }
.agency-dialog form textarea { min-height:72px; }
.agency-dialog form .compare-file-note { font:450 .86rem/1.4 "Golos Text",Arial,sans-serif!important; color:#52614e!important; }
.agency-dialog .compare-previews:empty { display:none; }
.agency-dialog form .btn-form {
  width:100%; max-width:none; min-height:48px; margin:2px 0 0; white-space:normal; padding:10px 15px;
  border:0; border-radius:10px; background:#ffa641; color:#291f13; box-shadow:none; font:650 1rem/1.35 "Golos Text",Arial,sans-serif;
}
.agency-dialog form .btn-form:hover { background:#ffb25c; }
.agency-dialog .form-note,.agency-dialog .consent span { font:450 .86rem/1.45 "Golos Text",Arial,sans-serif!important; color:#4e594c; }
.agency-dialog form .form-note { margin:0; }
.agency-dialog .consent { display:flex; gap:9px; align-items:flex-start; }
.agency-dialog .consent input { width:18px; height:18px; flex:none; margin-top:2px; accent-color:#53723a; }
.agency-dialog form :is(input,textarea):focus-visible { outline:2px solid #91601a; outline-offset:1px; }
@media (max-width:760px) {
  .privacy-choices { flex-wrap:wrap; }
  .guide-invite.is-expanded { grid-template-columns:1fr auto; }
  .guide-invite.is-expanded .invite-postcards { display:none; }
  .guide-invite.is-expanded .dialog-dismiss { grid-column:2; grid-row:1; }
  .guide-invite.is-expanded .invite-action { grid-column:1/-1; justify-self:start; }
}
@media (max-width:600px) {
  .privacy-notice:modal {
    width:calc(100% - 16px); max-height:calc(100dvh - 16px - env(safe-area-inset-bottom));
    margin:auto auto max(8px,env(safe-area-inset-bottom)); border-radius:18px;
  }
  .privacy-copy p { font-size:.9rem; }
  .privacy-choices { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); width:100%; }
  .privacy-choices button { padding:6px 8px; min-width:0; }
  .privacy-notice:modal .privacy-inner { padding:24px 16px 18px; }
  .guide-invite.home-wrap { grid-template-columns:1fr; padding:12px 16px; }
  .guide-invite .invite-action { justify-self:start; }
  .guide-invite.is-expanded { grid-template-columns:1fr auto; }
  .guide-invite.is-expanded .invite-copy { grid-column:1; }
  .trip-guide { width:calc(100% - 16px); max-height:calc(100dvh - 16px); margin:auto auto max(8px,env(safe-area-inset-bottom)); border-radius:18px; }
  .guide-shell { display:block; }
  .guide-cover { height:clamp(50px,11dvh,90px); }
  .guide-cover img { object-position:center 53%; }
  .guide-page,.dialog-body { padding:18px; }
  .dialog-bar { padding:5px 12px; }
  .agency-dialog[open] { padding:8px; place-items:end center; }
  .agency-dialog .modal-card { width:100%; border-radius:16px; max-height:calc(100dvh - 16px - env(safe-area-inset-bottom)); margin-bottom:env(safe-area-inset-bottom); }
}
@media (prefers-reduced-motion:no-preference) {
  .trip-guide:modal,.privacy-notice:modal,.guide-invite.is-expanded .invite-copy { animation:agency-appear .18s ease-out; }
  @keyframes agency-appear { from { opacity:.6; transform:translateY(4px); } }
}
@media (prefers-reduced-motion:reduce) { .agency-dialog,.agency-dialog .modal-card { transition:none; } }

@media (min-width:1000px) and (min-height:560px) {
  body:has(.guide-invite.is-floating) #vk_community_messages { visibility:hidden!important; }
  .guide-invite.is-floating {
    position:fixed; inset:auto max(20px,env(safe-area-inset-right)) max(20px,env(safe-area-inset-bottom)) auto; z-index:24;
    width:330px; max-width:calc(100vw - 40px); margin:0; padding:18px;
    grid-template-columns:1fr auto; gap:8px; background:#fbfcf4; border:1px solid #bfceaf;
    box-shadow:0 8px 32px #26392626; border-radius:16px;
  }
  .guide-invite.is-floating .invite-postcards { grid-column:1; grid-row:1; height:60px; }
  .guide-invite.is-floating .dialog-dismiss { grid-column:2; grid-row:1; align-self:start; }
  .guide-invite.is-floating .invite-copy,.guide-invite.is-floating .invite-action { grid-column:1/-1; }
  .guide-invite.is-floating h2 { font-size:1.38rem; }
  .guide-invite.is-floating .invite-action { justify-self:start; }
}
