/* 037б · «Ваше изображение готово» — последняя бесплатная генерация гостя под блюром до входа (js/guest-lock.js).
   Главное — сама картинка: размытая во весь холст, по ней идёт блик; сверху метка «Откроется после входа»,
   снизу — стеклянная панель: вход в один клик (Google / Яндекс), «или по почте», три коротких довода. Палитра «Закат». */
.output.has-glock { border-style: solid; }
.output.has-glock .output__placeholder { display: none; }
.glock { position: absolute; inset: 0; z-index: 3; overflow: hidden; border-radius: inherit; isolation: isolate;
  display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 14px;
  padding: clamp(12px, 2.4vw, 22px); font-family: inherit; }

/* размытая картинка (превью 40 px растянуто) — цвета и композиция видны, детали — нет */
.glock__bg { position: absolute; inset: -14%; z-index: -3; background-size: cover; background-position: center;
  filter: blur(22px) saturate(1.5) brightness(.95); transform: scale(1.06); background-color: #2a1838;
  background-image: radial-gradient(60% 55% at 28% 30%, rgba(251,113,133,.85), transparent 70%),
    radial-gradient(55% 60% at 72% 62%, rgba(245,158,11,.7), transparent 70%),
    radial-gradient(50% 50% at 50% 90%, rgba(168,85,247,.55), transparent 70%);
  animation: glock-breathe 9s ease-in-out infinite alternate; }
/* лёгкая виньетка: панель снизу читается, картинка сверху и по центру — светится */
.glock__veil { position: absolute; inset: 0; z-index: -2; pointer-events: none;
  background: linear-gradient(180deg, rgba(8,11,21,.05) 0%, rgba(8,11,21,.12) 45%, rgba(8,11,21,.62) 100%); }
/* блик «картинка там, под стеклом» */
.glock__shine { position: absolute; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.glock__shine::before { content: ""; position: absolute; top: -40%; bottom: -40%; width: 38%; left: -60%; transform: rotate(18deg);
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.16) 45%, rgba(255,255,255,.26) 50%, rgba(255,255,255,.16) 55%, transparent);
  animation: glock-sweep 4.8s cubic-bezier(.45,.05,.3,1) 1.2s infinite; }

/* метка — по центру свободной части холста (над панелью) */
.glock__badge { margin: auto 0; display: inline-flex; align-items: center; gap: 8px; padding: 9px 15px 9px 12px; border-radius: 999px;
  font-size: 13.5px; font-weight: 700; letter-spacing: .01em; color: #fff; white-space: nowrap;
  background: rgba(10,12,24,.42); border: 1px solid rgba(255,255,255,.28);
  box-shadow: 0 10px 30px -12px rgba(0,0,0,.6), inset 0 1px 0 rgba(255,255,255,.22);
  -webkit-backdrop-filter: blur(10px) saturate(1.4); backdrop-filter: blur(10px) saturate(1.4);
  animation: glock-pop .5s cubic-bezier(.2,.9,.25,1.2) .15s both; }
.glock__badge svg { width: 16px; height: 16px; color: #fda4af; }

/* стеклянная панель снизу */
.glock__panel { position: relative; width: min(520px, 100%); padding: 18px 18px 14px; border-radius: 20px; text-align: center; color: #f8fafc;
  background: linear-gradient(165deg, rgba(20,23,40,.74), rgba(11,13,26,.84));
  border: 1px solid rgba(255,255,255,.14);
  box-shadow: 0 24px 60px -24px rgba(0,0,0,.85), inset 0 1px 0 rgba(255,255,255,.1);
  -webkit-backdrop-filter: blur(18px) saturate(1.3); backdrop-filter: blur(18px) saturate(1.3);
  animation: glock-rise .55s cubic-bezier(.2,.8,.2,1) .05s both; }
.glock__panel::before { content: ""; position: absolute; inset: -1px; border-radius: inherit; padding: 1px; pointer-events: none;
  background: linear-gradient(135deg, rgba(251,113,133,.7), rgba(244,114,182,.15) 35%, rgba(255,255,255,.08) 60%, rgba(245,158,11,.6));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; }
.glock__title { margin: 0; font-size: clamp(19px, 2.3vw, 22px); font-weight: 800; letter-spacing: -.02em; line-height: 1.2; }
.glock__title em { font-style: normal; background: linear-gradient(115deg, #fb7185, #f472b6 45%, #f59e0b);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.glock__sub { margin: 5px 0 14px; font-size: 14px; line-height: 1.4; color: #cbd5e1; }

/* вход в один клик: белые кнопки с логотипами (как привыкли видеть Google / Яндекс) — две в ряд, на узком — в столбик */
.glock__btns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.glock__btns.is-one { grid-template-columns: 1fr; max-width: 340px; margin: 0 auto; }
.glock__btn { position: relative; display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 50px; padding: 0 14px;
  border: 0; border-radius: 14px; cursor: pointer; font-family: inherit; font-size: 15px; font-weight: 700; line-height: 1.1; color: #111827;
  background: #fff; box-shadow: 0 14px 30px -14px rgba(236,72,153,.75), 0 0 0 1px rgba(255,255,255,.6) inset;
  transition: transform .15s ease, box-shadow .15s ease, filter .15s ease; overflow: hidden; }
.glock__btn::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  box-shadow: 0 0 0 0 rgba(251,113,133,.55); animation: glock-ring 2.6s ease-out 1.4s infinite; }
.glock__btns .glock__btn + .glock__btn::after { animation-delay: 2.7s; }
.glock__btn:hover { transform: translateY(-1px); box-shadow: 0 18px 34px -14px rgba(236,72,153,.9), 0 0 0 1px #fff inset; }
.glock__btn:active { transform: translateY(0); filter: brightness(.96); }
.glock__btn:focus-visible, .glock__mail:focus-visible { outline: 2px solid #fda4af; outline-offset: 3px; }
.glock__btn svg { flex: 0 0 22px; width: 22px; height: 22px; }
.glock__btn.is-busy { pointer-events: none; color: #6b7280; }
.glock__btn.is-busy svg { animation: glock-spin .9s linear infinite; }
.glock__mail { display: inline-flex; align-items: center; gap: 5px; margin: 10px auto 0; padding: 4px 8px; border: 0; background: none; cursor: pointer;
  font-family: inherit; font-size: 13.5px; font-weight: 600; color: #e2e8f0; text-decoration: underline; text-decoration-color: rgba(253,164,175,.55);
  text-underline-offset: 4px; }
.glock__mail:hover { color: #fff; text-decoration-color: #fda4af; }
.glock__mail svg { width: 14px; height: 14px; }

/* три довода — метки в одну строку */
.glock__perks { list-style: none; margin: 12px 0 0; padding: 12px 0 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 8px;
  border-top: 1px solid rgba(255,255,255,.08); }
.glock__perks li { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px 5px 8px; border-radius: 999px; font-size: 12.5px; line-height: 1.2;
  color: #cbd5e1; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.08); white-space: nowrap; }
.glock__perks li b { color: #fff; font-weight: 700; }
.glock__perks li svg { width: 14px; height: 14px; color: #fda4af; }
.glock__perks li.is-hot { color: #fde7ea; background: linear-gradient(120deg, rgba(251,113,133,.2), rgba(245,158,11,.12)); border-color: rgba(251,113,133,.4); }
.glock__perks li.is-hot svg { color: #fbbf24; }
.glock__msg { margin: 10px 0 0; font-size: 13px; line-height: 1.4; color: #fca5a5; }
.glock__msg:empty { display: none; }

/* «Открываем изображение…» (вошёл — сервер копирует картинку) */
.glock__opening { display: none; align-items: center; justify-content: center; gap: 10px; min-height: 50px; font-size: 15px; font-weight: 700; color: #fff; }
.glock__spin { width: 20px; height: 20px; border-radius: 50%; border: 2.5px solid rgba(255,255,255,.25); border-top-color: #fb7185; animation: glock-spin .8s linear infinite; }
.glock.is-busy .glock__btns, .glock.is-busy .glock__mail, .glock.is-busy .glock__perks { display: none; }
.glock.is-busy .glock__opening { display: flex; }
.glock.is-busy .glock__sub, .glock.is-busy .glock__badge { display: none; }
.glock.is-busy .glock__title { margin-bottom: 4px; }

/* вернулся на страницу — без анимации появления */
.glock.is-back .glock__panel, .glock.is-back .glock__badge { animation: none; }
/* открыто: блюр «оттаивает» в резкую картинку, панель уезжает вниз, затем весь слой гаснет (после .is-back — сильнее) */
.glock.is-open { pointer-events: none; animation: glock-fade .3s ease .6s forwards; }
.glock.is-open .glock__bg { animation: glock-unblur .8s ease forwards; }
.glock.is-open .glock__veil, .glock.is-open .glock__shine, .glock.is-open .glock__badge { animation: glock-fade .45s ease forwards; }
.glock.is-open .glock__panel { animation: glock-drop .45s cubic-bezier(.5,0,.75,0) forwards; }


@keyframes glock-breathe { from { transform: scale(1.06); } to { transform: scale(1.12) translate(-1.5%, 1%); } }
@keyframes glock-sweep { 0% { left: -60%; } 55%, 100% { left: 130%; } }
@keyframes glock-pop { from { opacity: 0; transform: translateY(6px) scale(.92); } to { opacity: 1; transform: none; } }
@keyframes glock-rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes glock-ring { 0% { box-shadow: 0 0 0 0 rgba(251,113,133,.55); } 70%, 100% { box-shadow: 0 0 0 10px rgba(251,113,133,0); } }
@keyframes glock-spin { to { transform: rotate(360deg); } }
@keyframes glock-unblur { from { filter: blur(22px) saturate(1.5); opacity: 1; } to { filter: blur(0) saturate(1); opacity: 0; } }
@keyframes glock-fade { to { opacity: 0; } }
@keyframes glock-drop { to { opacity: 0; transform: translateY(24px); } }

.glock__long, .glock__short { font-style: normal; }
.glock__short { display: none; }

/* телефон: панель во всю ширину снизу; кнопки — в ряд с короткими подписями («Google», «Яндекс ID»), доводы — в одну строку */
@media (max-width: 560px) {
  .glock { padding: 10px; gap: 10px; }
  .glock__long { display: none; }
  .glock__short { display: inline; }
  .glock__panel { padding: 14px 12px 11px; border-radius: 18px; }
  .glock__title { font-size: 19px; }
  .glock__sub { font-size: 13.5px; margin-bottom: 12px; }
  .glock__btns { gap: 8px; }
  .glock__btns.is-one { max-width: none; }
  .glock__btn { min-height: 48px; gap: 8px; padding: 0 10px; font-size: 15px; }
  .glock__btn svg { flex-basis: 20px; width: 20px; height: 20px; }
  .glock__mail { margin-top: 8px; }
  .glock__perks { margin-top: 10px; padding-top: 10px; gap: 5px; flex-wrap: nowrap; }
  .glock__perks li { font-size: 12px; padding: 4px 8px 4px 7px; }
  .glock__perks li svg { width: 13px; height: 13px; }
  .glock__badge { font-size: 13px; padding: 8px 13px 8px 10px; }
}
.glock__btn span { white-space: nowrap; }
/* очень узко (320 px) — третий довод прячем, чтобы метки остались в одну строку; кнопки и заголовок — в одну строку */
@media (max-width: 360px) {
  .glock__perks li:last-child { display: none; }
  .glock__title { font-size: 17px; }
  .glock__sub { font-size: 13px; }
  .glock__btns { gap: 6px; }
  .glock__btn { font-size: 14px; gap: 6px; padding: 0 8px; }
  .glock__btn svg { flex-basis: 18px; width: 18px; height: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  .glock__bg, .glock__shine::before, .glock__badge, .glock__panel, .glock__btn::after { animation: none !important; }
  .glock.is-open, .glock.is-open .glock__bg, .glock.is-open .glock__panel { animation: none !important; opacity: 0; }
}

/* загрузка гостя на последней попытке: «Готово · откроется после регистрации» вместо отсчёта (adaptive-loader.js) */
.loader-overlay.is-locked .loader-ready__txt b { display: none; }

