/* PG Cookie Consent - style baneru/preferencji. Zmienne (--pgcc-*) wstrzykiwane inline w <head>
   przez PGCC_Core::wypisz_zmienne_css() z ustawień wyglądu w panelu admina. */
#pgcc-root, #pgcc-root * { box-sizing: border-box; }
#pgcc-root { position: fixed; inset: 0; z-index: 999990; pointer-events: none; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; }

.pgcc-banner {
    /* Ukryty baner (opacity 0) NIE może przechwytywać kliknięć - wcześniej niewidzialny baner
       zasłaniał np. dolny pasek CTA strony po wyrażeniu zgody. visibility opóźnione o czas
       animacji, żeby znikanie nadal było płynne. */
    pointer-events: none;
    visibility: hidden;
    background: var(--pgcc-bg, #0d0f13);
    color: var(--pgcc-text, #e8e8e8);
    border-radius: var(--pgcc-radius, 14px);
    box-shadow: 0 10px 40px rgba(0,0,0,.5);
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 18px 22px;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity .35s ease, transform .35s ease, visibility 0s linear .35s;
}
#pgcc-root.pgcc-widoczny .pgcc-banner { opacity: 1; transform: translateY(0); visibility: visible; pointer-events: auto; transition: opacity .35s ease, transform .35s ease, visibility 0s; }

.pgcc-pozycja-dol .pgcc-banner { position: fixed; left: 16px; right: 16px; bottom: 16px; max-width: 980px; margin: 0 auto; flex-wrap: wrap; }
.pgcc-pozycja-dol-lewo .pgcc-banner { position: fixed; left: 16px; bottom: 16px; max-width: 420px; flex-direction: column; align-items: flex-start; }
.pgcc-pozycja-dol-prawo .pgcc-banner { position: fixed; right: 16px; bottom: 16px; max-width: 420px; flex-direction: column; align-items: flex-start; }
.pgcc-pozycja-srodek .pgcc-banner { position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%); max-width: 520px; flex-direction: column; align-items: flex-start; }
.pgcc-pozycja-srodek.pgcc-widoczny .pgcc-banner { transform: translate(-50%, -50%); }

.pgcc-logo { max-height: 36px; flex-shrink: 0; }
.pgcc-tresc { flex: 1 1 320px; min-width: 0; }
.pgcc-tresc strong { display: block; margin-bottom: 4px; font-size: 1.05em; }
.pgcc-tresc p { margin: 0; font-size: .88em; line-height: 1.5; opacity: .92; }

/* Oba główne przyciski muszą być TAK SAMO widoczne (wymóg wytycznych EDPB/UODO) - różni je
   tylko wypełnienie, nie rozmiar/waga czcionki/kontrast. */
.pgcc-przyciski { display: flex; gap: 10px; flex-wrap: wrap; flex-shrink: 0; }
.pgcc-btn {
    appearance: none; border: 2px solid var(--pgcc-accent, #fdc10d); border-radius: calc(var(--pgcc-radius, 14px) / 1.6);
    padding: 11px 18px; font-size: .85em; font-weight: 700; cursor: pointer; white-space: nowrap;
    text-transform: uppercase; letter-spacing: .3px; transition: filter .15s;
}
.pgcc-btn:hover { filter: brightness(1.12); }
.pgcc-btn-glowny { background: var(--pgcc-accent, #fdc10d); color: var(--pgcc-accent-text, #0d0f13); }
.pgcc-btn-outline { background: transparent; color: var(--pgcc-text, #e8e8e8); }

.pgcc-banner-notice { max-width: 680px; }

.pgcc-modal-overlay {
    pointer-events: none; opacity: 0; position: fixed; inset: 0; background: rgba(0,0,0,.6);
    display: flex; align-items: center; justify-content: center; z-index: 999991; padding: 20px;
    transition: opacity .2s ease;
}
.pgcc-modal-overlay.pgcc-modal-otwarty { pointer-events: auto; opacity: 1; }
.pgcc-modal-box {
    background: var(--pgcc-bg, #0d0f13); color: var(--pgcc-text, #e8e8e8); border-radius: var(--pgcc-radius, 14px);
    padding: 26px; max-width: 520px; width: 100%; max-height: 85vh; overflow-y: auto; box-shadow: 0 20px 60px rgba(0,0,0,.6);
}
.pgcc-modal-box h3 { margin: 0 0 16px 0; font-size: 1.15em; }
.pgcc-kategoria { border-top: 1px solid rgba(255,255,255,.1); padding: 12px 0; }
.pgcc-kategoria:first-of-type { border-top: none; }
.pgcc-kategoria-glowka { display: flex; justify-content: space-between; align-items: center; font-weight: 700; cursor: pointer; }
.pgcc-kategoria-glowka input[type="checkbox"] { width: 20px; height: 20px; accent-color: var(--pgcc-accent, #fdc10d); }
.pgcc-kategoria p { margin: 6px 0 0 0; font-size: .82em; opacity: .85; line-height: 1.5; }
.pgcc-stopka { display: flex; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
.pgcc-stopka .pgcc-btn { flex: 1; }
.pgcc-wycofanie { font-size: .76em; opacity: .7; margin: 14px 0 0 0; }

.pgcc-ikona-ponow {
    pointer-events: auto; position: fixed; left: 16px; bottom: 16px; width: 50px; height: 50px; border-radius: 50%;
    background: var(--pgcc-bg, #0d0f13); color: var(--pgcc-accent, #fdc10d); border: 2px solid var(--pgcc-accent, #fdc10d);
    font-size: 22px; display: flex; align-items: center; justify-content: center; cursor: pointer;
    box-shadow: 0 4px 16px rgba(0,0,0,.4); z-index: 999989;
}
/* Motywy często stylują globalnie <button> (padding, min-width, line-height) - bez tego ikona
   rozciągała się w elipsę. */
#pgcc-root .pgcc-ikona-ponow { width: 50px !important; height: 50px !important; min-width: 0 !important; min-height: 0 !important; max-width: 50px !important;
    padding: 0 !important; margin: 0 !important; line-height: 1 !important; border-radius: 50% !important; letter-spacing: 0 !important; text-transform: none !important; transition: none !important;
    background: var(--pgcc-bg, #0d0f13) !important; color: var(--pgcc-accent, #fdc10d) !important; border: 2px solid var(--pgcc-accent, #fdc10d) !important;
    font-size: 24px !important; opacity: 1 !important; box-shadow: 0 4px 16px rgba(0,0,0,.25) !important; text-shadow: none !important; }
#pgcc-root .pgcc-ikona-ponow:hover, #pgcc-root .pgcc-ikona-ponow:focus { background: var(--pgcc-bg, #0d0f13) !important; transform: scale(1.06); }

.pgcc-deklaracja { margin: 20px 0; }
.pgcc-deklaracja-kategoria { margin-top: 24px; }
.pgcc-deklaracja-tabela { width: 100%; border-collapse: collapse; font-size: .9em; }
.pgcc-deklaracja-tabela th, .pgcc-deklaracja-tabela td { text-align: left; padding: 8px 10px; border-bottom: 1px solid rgba(0,0,0,.1); }

@media (max-width: 640px) {
    .pgcc-banner { flex-direction: column; align-items: stretch; }
    /* W układzie kolumnowym flex-basis 320px działał jak WYSOKOŚĆ - pusta przestrzeń w banerze. */
    .pgcc-tresc { flex: 0 0 auto; }
    .pgcc-przyciski { flex-direction: column; }
    .pgcc-przyciski .pgcc-btn { width: 100%; }
    .pgcc-pozycja-dol-lewo .pgcc-banner, .pgcc-pozycja-dol-prawo .pgcc-banner { left: 10px; right: 10px; max-width: none; }
}

/* Linki do polityk w banerze/modalu */
.pgcc-linki { margin: 6px 0 0 0 !important; font-size: .8em !important; opacity: .85; }
.pgcc-linki a { color: inherit; text-decoration: underline; }
.pgcc-linki a:hover { opacity: 1; }

/* Podpis autora wtyczki */
#pgcc-root .pgcc-podpis { margin: 6px 0 0 0; font-size: .7em; opacity: .55; line-height: 1.3; }
#pgcc-root .pgcc-podpis a { color: inherit; text-decoration: none; }
#pgcc-root .pgcc-podpis a:hover { text-decoration: underline; opacity: 1; }
