/* Pies dla Ciebie – PWA: baner instalacji, arkusze, dolny pasek w trybie aplikacji. */
:root {
	--pwa-navy: #23395B;
	--pwa-navy-2: #172742;
	--pwa-amber: #E8A33D;
	--pwa-line: #E3E6EE;
	--pwa-text: #1A2233;
	--pwa-text-2: #444C5E;
	--pwa-soft: #F6F7FA;
	--pwa-safe-b: env(safe-area-inset-bottom, 0px);
	--pwa-tab-h: 62px;
}

/* przyciski */
.dpr-pwa-btn { font: inherit; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 20px; border-radius: 999px; border: 2px solid var(--pwa-navy); background: var(--pwa-navy); color: #fff; cursor: pointer; text-decoration: none; }
.dpr-pwa-btn:hover { background: var(--pwa-navy-2); border-color: var(--pwa-navy-2); }
.dpr-pwa-btn--ghost { background: transparent; color: var(--pwa-navy); border-color: var(--pwa-line); }
.dpr-pwa-btn--ghost:hover { background: var(--pwa-soft); color: var(--pwa-navy-2); border-color: var(--pwa-navy); }
.dpr-pwa-btn:focus-visible, .dpr-pwa-bell:focus-visible, .dpr-tabbar a:focus-visible { outline: 3px solid var(--pwa-amber); outline-offset: 2px; }
.dpr-pwa-link { font: inherit; background: none; border: 0; color: var(--pwa-navy); text-decoration: underline; cursor: pointer; padding: 6px; }

/* baner instalacji */
.dpr-pwa-banner { position: fixed; z-index: 99990; left: 12px; right: 12px; bottom: calc(12px + var(--pwa-safe-b)); max-width: 560px; margin: 0 auto; display: grid; grid-template-columns: 48px 1fr; gap: 12px 14px; align-items: center; background: #fff; color: var(--pwa-text); border: 1px solid var(--pwa-line); border-radius: 18px; box-shadow: 0 12px 40px rgba(23, 39, 66, .2); padding: 14px 16px; transform: translateY(140%); transition: transform .35s cubic-bezier(.2, .8, .2, 1); font-size: 15px; line-height: 1.4; }
.dpr-pwa-banner.is-on { transform: none; }
.dpr-pwa-banner img { border-radius: 12px; }
.dpr-pwa-banner__txt b { display: block; font-size: 16px; color: var(--pwa-navy-2); }
.dpr-pwa-banner__txt span { color: var(--pwa-text-2); }
.dpr-pwa-banner__btns { grid-column: 1 / -1; display: flex; gap: 10px; justify-content: flex-end; }
@media (min-width: 640px) { .dpr-pwa-banner { grid-template-columns: 48px 1fr auto; } .dpr-pwa-banner__btns { grid-column: auto; } }

/* arkusz od dołu */
.dpr-pwa-sheet { position: fixed; inset: 0; z-index: 100000; display: flex; align-items: flex-end; justify-content: center; }
.dpr-pwa-sheet__bg { position: absolute; inset: 0; background: rgba(23, 39, 66, .45); opacity: 0; transition: opacity .25s; }
.dpr-pwa-sheet__box { position: relative; width: 100%; max-width: 560px; max-height: 88vh; overflow: auto; background: #fff; color: var(--pwa-text); border-radius: 22px 22px 0 0; padding: 26px 22px calc(22px + var(--pwa-safe-b)); transform: translateY(100%); transition: transform .3s cubic-bezier(.2, .8, .2, 1); font-size: 16px; line-height: 1.5; outline: none; }
.dpr-pwa-sheet.is-on .dpr-pwa-sheet__bg { opacity: 1; }
.dpr-pwa-sheet.is-on .dpr-pwa-sheet__box { transform: none; }
@media (min-width: 700px) { .dpr-pwa-sheet { align-items: center; } .dpr-pwa-sheet__box { border-radius: 22px; } }
.dpr-pwa-sheet__x { position: absolute; top: 12px; right: 12px; width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--pwa-soft); color: var(--pwa-text-2); cursor: pointer; display: flex; align-items: center; justify-content: center; }
.dpr-pwa-sheet__head { text-align: center; margin-bottom: 8px; }
.dpr-pwa-sheet__head img { border-radius: 14px; box-shadow: 0 6px 18px rgba(23, 39, 66, .2); }
.dpr-pwa-sheet h2 { font-size: 21px; line-height: 1.25; margin: 6px 0 12px; color: var(--pwa-navy-2); text-align: center; }
.dpr-pwa-sheet h3 { font-size: 16px; margin: 4px 0 8px; color: var(--pwa-navy-2); }
.dpr-pwa-sheet p { margin: 0 0 14px; color: var(--pwa-text-2); }
.dpr-pwa-sheet p:last-child { margin-bottom: 0; }
.dpr-pwa-sheet .dpr-pwa-btn { width: 100%; }
.dpr-pwa-steps { list-style: none; margin: 0 0 14px; padding: 0; counter-reset: s; }
.dpr-pwa-steps li { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-top: 1px solid var(--pwa-line); counter-increment: s; }
.dpr-pwa-steps li:first-child { border-top: 0; }
.dpr-pwa-step-ico { flex: 0 0 44px; height: 44px; border-radius: 12px; background: var(--pwa-soft); color: #0a84ff; display: flex; align-items: center; justify-content: center; }
.dpr-pwa-step-ico--app { background: transparent; }
.dpr-pwa-step-ico--app img { border-radius: 8px; }
.dpr-pwa-note { font-size: 14px; }
.dpr-pwa-sheet.is-ios .dpr-pwa-sheet__box { padding-bottom: calc(46px + var(--pwa-safe-b)); }
.dpr-pwa-arrow { position: absolute; left: 50%; bottom: calc(8px + var(--pwa-safe-b)); width: 0; height: 0; margin-left: -12px; border: 12px solid transparent; border-top-color: var(--pwa-navy); animation: dpr-pwa-bob 1.4s ease-in-out infinite; }
@keyframes dpr-pwa-bob { 50% { transform: translateY(6px); } }
@media (prefers-reduced-motion: reduce) { .dpr-pwa-arrow { animation: none; } .dpr-pwa-banner, .dpr-pwa-sheet__box, .dpr-pwa-toast { transition: none; } }

/* ustawienia powiadomień */
.dpr-pwa-list { list-style: none; margin: 0 0 14px; padding: 0; }
.dpr-pwa-list li { display: flex; align-items: center; justify-content: space-between; padding: 8px 0; border-top: 1px solid var(--pwa-line); }
.dpr-pwa-list li:first-child { border-top: 0; }
.dpr-pwa-switch { display: flex; gap: 10px; align-items: flex-start; margin: 6px 0 16px; cursor: pointer; }
.dpr-pwa-switch input { width: 20px; height: 20px; accent-color: var(--pwa-navy); margin-top: 2px; flex: 0 0 auto; }

/* przycisk „Obserwuj mioty” */
.dpr-pwa-bell { font: inherit; font-weight: 600; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px; border-radius: 999px; border: 2px solid var(--pwa-line); background: #fff; color: var(--pwa-navy); cursor: pointer; }
.dpr-pwa-bell:hover { border-color: var(--pwa-navy); }
.dpr-pwa-bell.is-on { background: #FFF4E2; border-color: var(--pwa-amber); color: var(--pwa-navy-2); }
.dpr-pwa-bell[disabled] { opacity: .6; cursor: progress; }
.dpr-pwa-bell__msg { display: block; font-size: 14px; color: var(--pwa-text-2); margin-top: 6px; }
.dpr-pwa-bell__msg:empty { display: none; }
[data-dpr-obserwuj] { margin: 12px 0 0; }
.dpr-obserwuj-wynik { background: #fff; border: 1px solid var(--pwa-line); border-radius: 14px; padding: 14px 16px; margin: 18px 0; }
.dpr-obserwuj-wynik > p { margin: 0 0 10px; }

/* komunikat */
.dpr-pwa-toast { position: fixed; z-index: 100001; left: 50%; bottom: calc(18px + var(--pwa-safe-b)); transform: translate(-50%, 160%); max-width: calc(100% - 24px); display: flex; align-items: center; gap: 14px; background: var(--pwa-navy-2); color: #fff; padding: 12px 16px; border-radius: 14px; box-shadow: 0 10px 30px rgba(0, 0, 0, .25); transition: transform .3s cubic-bezier(.2, .8, .2, 1); font-size: 15px; }
.dpr-pwa-toast.is-on { transform: translate(-50%, 0); }
.dpr-pwa-toast button { font: inherit; font-weight: 700; color: var(--pwa-amber); background: none; border: 0; cursor: pointer; padding: 4px; white-space: nowrap; }

/* tryb aplikacji (uruchomienie z ikony) */
.dpr-tabbar { display: none; }
@media (max-width: 899px) {
	html.dpr-standalone body { padding-bottom: calc(var(--pwa-tab-h) + var(--pwa-safe-b)); }
	html.dpr-standalone .dpr-tabbar { display: flex; position: fixed; z-index: 99980; left: 0; right: 0; bottom: 0; padding-bottom: var(--pwa-safe-b); background: rgba(255, 255, 255, .96); -webkit-backdrop-filter: saturate(1.6) blur(14px); backdrop-filter: saturate(1.6) blur(14px); border-top: 1px solid var(--pwa-line); }
	html.dpr-standalone .dpr-tabbar a { flex: 1; height: var(--pwa-tab-h); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: #5B6375; text-decoration: none; font-size: 11px; font-weight: 600; -webkit-tap-highlight-color: transparent; }
	html.dpr-standalone .dpr-tabbar a.is-on { color: var(--pwa-navy); }
	html.dpr-standalone .dpr-tabbar a.is-on svg { stroke-width: 2.2; }
	html.dpr-standalone .dpr-tabbar a.is-on span::after { content: ""; display: block; width: 18px; height: 3px; border-radius: 3px; background: var(--pwa-amber); margin: 3px auto 0; }
	html.dpr-standalone .dpr-pwa-banner, html.dpr-standalone .dpr-pwa-toast { bottom: calc(var(--pwa-tab-h) + 12px + var(--pwa-safe-b)); }
	html.dpr-standalone #dpr-cookies { bottom: calc(var(--pwa-tab-h) + 8px + var(--pwa-safe-b)); }
}
html.dpr-standalone body { padding-left: env(safe-area-inset-left, 0px); padding-right: env(safe-area-inset-right, 0px); -webkit-tap-highlight-color: transparent; }
html.dpr-standalone .dpr-pwa-footlink[data-pwa="instaluj"] { display: none; }

/* Czat i inne pływające przyciski nie mogą zasłaniać banera, arkusza ani banera cookies. */
html.dpr-pwa-overlay .ham-chatbot, html.dpr-pwa-overlay .ham-chatbot-floating,
html.dpr-cookies-on .ham-chatbot, html.dpr-cookies-on .ham-chatbot-floating { display: none !important; }

/* W trybie aplikacji przycisk czatu nad dolnym paskiem. */
@media (max-width: 899px) {
	html.dpr-standalone .ham-chatbot-floating { bottom: calc(var(--pwa-tab-h) + 14px + var(--pwa-safe-b)) !important; }
}
