/* v1.2: уведомления (PWA, Web Push), баннер cookie, реклама с маркировкой. Только токены дизайн-системы из main.css. */

/* ---------- страница /uvedomleniya/ ---------- */
.push-page { max-width: 980px; margin-inline: auto; display: grid; gap: var(--s-6); }
.push-hero { display: flex; gap: var(--s-4); align-items: flex-start; padding: var(--s-6); border-radius: var(--r-lg); background: var(--grad-dusk); color: #fff; }
.push-hero__icon { flex-shrink: 0; display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: rgba(255, 255, 255, .16); color: var(--brand-lights); }
.push-hero__icon .icon { width: 28px; height: 28px; }
.push-hero__title { font-size: var(--fs-30); color: #fff; }
.push-hero__lead { margin-top: var(--s-2); color: rgba(255, 255, 255, .88); max-width: 60ch; }
.push-control { display: grid; gap: var(--s-4); }
.push-control__main { width: 100%; max-width: 360px; margin-top: var(--s-3); }
.push-state[hidden] { display: none; }
.push-topics fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: var(--s-1); }
.push-topics__legend { font-weight: 600; margin-bottom: var(--s-2); }
.push-topic { border-top: 1px solid var(--c-border); padding-block: var(--s-2); }
.push-topic > span { display: grid; gap: 2px; }
.push-topic__label { font-weight: 500; }
.push-topic__hint { font-size: var(--fs-13); color: var(--c-text-3); }
.push-section-title { font-size: var(--fs-24, 1.5rem); margin-top: var(--s-4); }
.push-subtitle { font-size: var(--fs-18, 1.125rem); margin-top: var(--s-6); margin-bottom: var(--s-3); }
.push-tabs { margin-block: 0; }
.push-tabs__mine { margin-left: var(--s-2); font-size: var(--fs-12, .75rem); font-weight: 500; padding: 2px 8px; border-radius: var(--r-pill); background: var(--c-primary-soft); color: var(--c-primary-soft-text); }
.push-guide { display: grid; gap: var(--s-4); }
.push-guide[hidden] { display: none; }
.push-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-4); grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.push-steps--compact { grid-template-columns: 1fr; }
.push-step { display: grid; gap: var(--s-3); align-content: start; background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--r-lg); padding: var(--s-4); }
.push-step__ill { margin: 0; display: grid; place-items: center; padding: var(--s-3); border-radius: var(--r-md); background: var(--c-surface-2); }
.push-step__ill .ill { width: 100%; max-width: 168px; height: auto; display: block; }
.push-step__text { display: grid; grid-template-columns: auto 1fr; gap: var(--s-1) var(--s-3); align-items: start; }
.push-step__text p { grid-column: 1 / -1; color: var(--c-text-2); font-size: var(--fs-14); line-height: 1.5; }
.push-step__num { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--c-primary); color: var(--c-on-primary); font-weight: 700; font-size: var(--fs-14); }
.push-step__title { font-size: var(--fs-16, 1rem); line-height: 1.35; align-self: center; }
.push-faq { display: grid; gap: var(--s-3); }
.push-faq__item { background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--r-lg); }
.push-faq__item > summary { cursor: pointer; padding: var(--s-4); font-weight: 600; min-height: var(--tap, 44px); list-style-position: inside; }
.push-faq__body { padding: 0 var(--s-4) var(--s-4); display: grid; gap: var(--s-3); color: var(--c-text-2); }
.push-faq__body--ill { grid-template-columns: minmax(0, 180px) 1fr; align-items: center; }
.push-list { margin: 0; padding-left: 1.2em; display: grid; gap: var(--s-2); }
@media (max-width: 599px) {
  .push-hero { padding: var(--s-5); flex-direction: column; }
  .push-hero__title { font-size: var(--fs-24, 1.5rem); }
  .push-faq__body--ill { grid-template-columns: 1fr; }
  .push-step { grid-template-columns: 136px 1fr; align-items: center; }
  .push-step__ill { padding: var(--s-2); }
}

/* иллюстрации шагов: SVG без inline-стилей, цвета — из токенов, работают в тёмной теме */
.ill { font-family: var(--font-ui); }
.ill-body { fill: var(--c-text); }
.ill-screen { fill: var(--c-surface); }
.ill-ink { fill: var(--c-text); }
.ill-line { fill: var(--c-surface-3); }
.ill-line--soft { fill: var(--c-surface-2); }
.ill-bar { fill: var(--c-surface-2); }
.ill-pill { fill: var(--c-surface-3); }
.ill-row { fill: var(--c-surface-2); }
.ill-sheet, .ill-dialog { fill: var(--c-surface); stroke: var(--c-border); }
.ill-dim { fill: var(--c-overlay); }
.ill-brand, .ill-btn, .ill-app--brand { fill: var(--c-primary); }
.ill-app { fill: rgba(255, 255, 255, .55); }
.ill-wall { fill: var(--brand-ground); }
.ill-dock { fill: rgba(255, 255, 255, .25); }
.ill-soft { fill: var(--c-primary-soft); }
.ill-t { fill: var(--c-text); }
.ill-t2 { fill: var(--c-text-3); }
.ill-tb { fill: var(--c-text); font-weight: 700; }
.ill-link { fill: #1F6FE5; }
.ill-on-brand { fill: #fff; }
.ill-on-wall { fill: #fff; }
.ill-accent-text { fill: var(--c-accent); }
.ill-icon { fill: none; stroke: var(--c-text-2); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ill-icon--accent { stroke: #1F6FE5; }
.ill-sep { stroke: var(--c-border); stroke-width: 1; }
.ill-safari { fill: #1F6FE5; }
.ill-safari-face { fill: #fff; }
.ill-needle-red { fill: #E5383B; }
.ill-needle { fill: #9AA3AF; }
.ill-toggle { fill: var(--c-success); }
.ill-toggle-knob { fill: #fff; }
.ill-hl { fill: none; stroke: var(--c-accent); stroke-width: 3; }
.ill-arrow { stroke: var(--c-accent); stroke-width: 2.5; stroke-linecap: round; marker-end: none; }
.ill-tap { fill: var(--c-accent); opacity: .3; }
.ill-tap-ring { fill: none; stroke: var(--c-accent); stroke-width: 2; opacity: .5; transform-box: fill-box; transform-origin: center; }
@media (prefers-reduced-motion: no-preference) {
  .ill-tap-ring { animation: ill-pulse 1.8s var(--ease, ease-out) infinite; }
}
@keyframes ill-pulse { 0% { transform: scale(.6); opacity: .7; } 100% { transform: scale(1.35); opacity: 0; } }

/* приглашение подписаться (после 2-го визита) */
.push-invite { position: fixed; z-index: 60; left: var(--s-3); right: var(--s-3); bottom: calc(var(--tabbar-h, 64px) + var(--s-3) + env(safe-area-inset-bottom)); max-width: 560px; margin-inline: auto; display: grid; grid-template-columns: auto 1fr; gap: var(--s-2) var(--s-3); align-items: center; padding: var(--s-4); background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--r-lg); box-shadow: var(--shadow-3); transform: translateY(12px); opacity: 0; transition: transform var(--dur) var(--ease), opacity var(--dur) var(--ease); }
.push-invite.is-shown { transform: none; opacity: 1; }
.push-invite[hidden] { display: none; }
.push-invite__icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--c-primary-soft); color: var(--c-primary); }
.push-invite__text { display: grid; gap: 2px; font-size: var(--fs-14); }
.push-invite__text span { color: var(--c-text-2); }
.push-invite__actions { grid-column: 1 / -1; display: flex; gap: var(--s-2); flex-wrap: wrap; justify-content: flex-end; }
@media (min-width: 900px) { .push-invite { left: auto; right: var(--s-6); bottom: var(--s-6); margin: 0; } }

/* предпросмотр уведомления в панели */
.push-preview { display: flex; gap: var(--s-3); padding: var(--s-3); border-radius: 18px; background: var(--c-surface-2); border: 1px solid var(--c-border); max-width: 420px; }
.push-preview__icon { border-radius: 10px; flex-shrink: 0; }
.push-preview__text { display: grid; gap: 2px; min-width: 0; font-size: var(--fs-14); }
.push-preview__head { display: flex; justify-content: space-between; gap: var(--s-2); font-size: var(--fs-13); color: var(--c-text-3); }
.push-preview__title { overflow-wrap: anywhere; }
.push-preview__body { color: var(--c-text-2); display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }

.offline-state { margin-top: 15vh; display: grid; justify-items: center; gap: var(--s-4); text-align: center; }

/* ---------- баннер cookie ---------- */
.cookie-banner { position: fixed; z-index: 70; left: 0; right: 0; bottom: calc(var(--tabbar-h, 64px) + env(safe-area-inset-bottom)); padding: var(--s-3); }
.cookie-banner[hidden] { display: none; }
.cookie-banner__inner { max-width: 980px; margin-inline: auto; display: flex; flex-wrap: wrap; gap: var(--s-3) var(--s-4); align-items: center; justify-content: space-between; padding: var(--s-4); background: var(--c-surface); border: 1px solid var(--c-border-strong); border-radius: var(--r-lg); box-shadow: var(--shadow-3); }
.cookie-banner__text { flex: 1 1 420px; font-size: var(--fs-14); color: var(--c-text-2); line-height: 1.5; }
.cookie-banner__text b { color: var(--c-text); }
.cookie-banner__actions { display: flex; gap: var(--s-2); flex-wrap: wrap; }
@media (min-width: 900px) { .cookie-banner { bottom: 0; } }
@media (max-width: 599px) { .cookie-banner__actions { width: 100%; } .cookie-banner__actions .btn { flex: 1 1 auto; } }
.cookie-page { max-width: 640px; }
.cookie-choice { border: 0; padding: 0; margin: 0; display: grid; gap: var(--s-2); }
.cookie-choice .check__text small { display: block; color: var(--c-text-3); margin-top: 2px; }

/* ---------- реклама: заметно, но не под видом новости ---------- */
.ad { position: relative; display: grid; gap: var(--s-2); padding: var(--s-4); border: 1px dashed var(--c-border-strong); border-radius: var(--r-lg); background: var(--c-surface-2); }
.ad__label { justify-self: start; display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: var(--r-sm, 6px); background: var(--c-text); color: var(--c-bg); font-size: var(--fs-12, .75rem); font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.ad__label--card { margin-bottom: var(--s-1); }
.ad__link { display: grid; gap: var(--s-3); color: inherit; text-decoration: none; }
.ad--with-image.ad--feed .ad__link { grid-template-columns: minmax(0, 220px) 1fr; align-items: center; }
.ad__img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--r-md); background: var(--c-surface-3); }
.ad__body { display: grid; gap: var(--s-1); }
.ad__title { font-family: var(--font-display, inherit); font-weight: 700; font-size: var(--fs-16, 1rem); }
.ad__text { color: var(--c-text-2); font-size: var(--fs-14); }
.ad__cta { display: inline-flex; align-items: center; gap: 4px; color: var(--c-primary); font-weight: 600; font-size: var(--fs-14); margin-top: var(--s-1); }
.ad__link:hover .ad__title { text-decoration: underline; }
.ad__legal { font-size: var(--fs-12, .75rem); color: var(--c-text-3); line-height: 1.4; overflow-wrap: anywhere; }
@media (max-width: 599px) { .ad--with-image.ad--feed .ad__link { grid-template-columns: 1fr; } }
.ad-article-mark { display: grid; gap: var(--s-1); margin-bottom: var(--s-3); }
.news-card--sponsored { border-style: dashed; }

/* панель рекламы */
.ads-checks { display: grid; gap: 0; }
.ads-checks .check__box { flex-shrink: 0; }
.ads-form { display: grid; gap: var(--s-4); max-width: 720px; }
.ads-form__preview { max-width: 320px; border-radius: var(--r-md); }
.ads-period { align-items: flex-end; }
.ads-period__field { min-width: 160px; }
.ads-warn { display: flex; gap: var(--s-1); align-items: center; margin-top: var(--s-1); color: var(--c-danger); font-size: var(--fs-13); }
/* шапка на узких экранах: колокольчик — в шторке («Уведомления»), чтобы не было горизонтальной прокрутки */
@media (max-width: 599px) { .site-header .site-header__bell { display: none; } }
