/* =============================================
   TASSEL Consent v1.6.2 - consent.css
   ASCII only - dhosting compatible
   ============================================= */

/* ---- Root variables (overridden inline by PHP) ---- */
:root {
    --tc-bg:          #ffffff;
    --tc-text:        #1a1a1a;
    --tc-accent:      #2563eb;
    --tc-btn-text:    #ffffff;
    --tc-reject-bg:   #f3f4f6;
    --tc-reject-text: #374151;
    --tc-radius:      12px;
}

/* ---- Overlay ---- */
.tc-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    z-index: 99997;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}

.tc-overlay.tc-visible {
    opacity: 1;
    pointer-events: auto;
}

body.tc-consent-lock {
    overflow: hidden;
}

/* ---- Popup base ---- */
#tc-popup {
    position: fixed;
    z-index: 99999;
    left: 0;
    right: 0;
    background: var(--tc-bg);
    color: var(--tc-text);
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, sans-serif;
    font-size: 15px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;

    /* Hidden by default */
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.28s ease, transform 0.32s cubic-bezier(0.4, 0, 0.2, 1);
}

#tc-popup * { box-sizing: border-box; }

#tc-popup.tc-visible {
    opacity: 1;
    pointer-events: auto;
}

/* ---- Position: bottom (default) ---- */
.tc-position-bottom {
    bottom: 0;
    transform: translateY(24px);
    box-shadow: 0 -2px 20px rgba(0,0,0,0.10);
}

.tc-position-bottom.tc-visible {
    transform: translateY(0);
}

/* ---- Position: top ---- */
.tc-position-top {
    top: 0;
    transform: translateY(-24px);
    box-shadow: 0 2px 20px rgba(0,0,0,0.10);
}

.tc-position-top.tc-visible {
    transform: translateY(0);
}

/* ---- Position: modal ---- */
.tc-position-modal {
    top: 50%;
    left: 50%;
    right: auto;
    bottom: auto;
    width: min(560px, calc(100vw - 32px));
    transform: translate(-50%, -50%) scale(0.96);
    border-radius: var(--tc-radius);
    box-shadow: 0 8px 48px rgba(0,0,0,0.18);
}

.tc-position-modal.tc-visible {
    transform: translate(-50%, -50%) scale(1);
}

/* ---- Inner layout ---- */
.tc-popup__inner {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    padding: 18px 24px;
    max-width: 1280px;
    margin: 0 auto;
}

.tc-position-modal .tc-popup__inner {
    flex-direction: column;
    align-items: flex-start;
    padding: 28px 28px 24px;
}

/* ---- Content ---- */
.tc-popup__content {
    flex: 1;
    min-width: 200px;
}

.tc-popup__title {
    font-size: 0.95rem;
    font-weight: 700;
    margin: 0 0 4px;
    color: inherit;
}

.tc-popup__text {
    font-size: 0.84rem;
    margin: 0;
    opacity: 0.75;
    line-height: 1.5;
}

/* ---- Action buttons container ---- */
.tc-popup__actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    flex-shrink: 0;
}

.tc-position-modal .tc-popup__actions {
    width: 100%;
    flex-direction: column;
    gap: 8px;
}

.tc-position-modal .tc-popup__actions .tc-btn {
    width: 100%;
    justify-content: center;
}

/* ---- Buttons ---- */
/* Scoped under #tc-popup / #tc-settings-panel (ID specificity) and reset
   so theme button skins (Kadence, Gutenberg) cannot override the fill,
   border or accent color. Without this the active theme repaints the
   buttons with its own palette and the accent setting has no effect. */
#tc-popup .tc-btn,
#tc-settings-panel .tc-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 10px 20px;
    min-height: 0;
    width: auto;
    max-width: none;
    border: 2px solid transparent;
    border-radius: var(--tc-radius);
    cursor: pointer;
    font-family: inherit;
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1;
    text-align: center;
    text-decoration: none;
    text-transform: none;
    letter-spacing: normal;
    white-space: nowrap;
    background-image: none;
    box-shadow: none;
    text-shadow: none;
    filter: none;
    -webkit-appearance: none;
    appearance: none;
    transition: opacity 0.15s ease, transform 0.1s ease, box-shadow 0.15s ease;
}

#tc-popup .tc-btn:hover,
#tc-settings-panel .tc-btn:hover { opacity: 0.88; }

#tc-popup .tc-btn:active,
#tc-settings-panel .tc-btn:active { transform: scale(0.97); }

#tc-popup .tc-btn:focus-visible,
#tc-settings-panel .tc-btn:focus-visible {
    outline: 3px solid var(--tc-accent);
    outline-offset: 2px;
}

/* Primary (Akceptuj) = accent fill - main call to action */
#tc-popup .tc-btn--primary,
#tc-settings-panel .tc-btn--primary {
    background: var(--tc-accent);
    color: var(--tc-btn-text);
    border-color: var(--tc-accent);
}

/* Secondary (Odrzuc) = solid neutral. Kept the same size and shape as the
   primary button so rejecting stays exactly as easy as accepting
   (RODO/UODO: zgoda musi byc rownie latwa do odmowy). */
#tc-popup .tc-btn--secondary,
#tc-settings-panel .tc-btn--secondary {
    background: var(--tc-reject-bg);
    color: var(--tc-reject-text);
    border-color: var(--tc-reject-bg);
}

/* Ghost (Dostosuj) = quiet text-style link, intentionally lowest emphasis */
#tc-popup .tc-btn--ghost,
#tc-settings-panel .tc-btn--ghost {
    background: transparent;
    color: var(--tc-text);
    border-color: transparent;
    opacity: 0.6;
    padding: 10px 14px;
}

#tc-popup .tc-btn--ghost:hover,
#tc-settings-panel .tc-btn--ghost:hover { opacity: 1; }

/* ---- Settings panel ---- */
#tc-settings-panel {
    position: fixed;
    z-index: 99999;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%) translateY(32px);
    width: min(520px, 100vw);
    max-height: 88vh;
    background: var(--tc-bg);
    color: var(--tc-text);
    border-radius: var(--tc-radius) var(--tc-radius) 0 0;
    box-shadow: 0 -4px 40px rgba(0,0,0,0.16);
    display: flex;
    flex-direction: column;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, sans-serif;
    font-size: 15px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    box-sizing: border-box;

    opacity: 0;
    pointer-events: none;
    transition: opacity 0.28s ease, transform 0.32s cubic-bezier(0.4, 0, 0.2, 1);
}

#tc-settings-panel * { box-sizing: border-box; }

#tc-settings-panel.tc-visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
}

.tc-settings-panel__inner {
    display: flex;
    flex-direction: column;
    max-height: 88vh;
    overflow: hidden;
}

.tc-settings-panel__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px 16px;
    border-bottom: 1px solid rgba(0,0,0,0.08);
    flex-shrink: 0;
}

.tc-settings-panel__title {
    font-size: 1rem;
    font-weight: 700;
    margin: 0;
    color: inherit;
}

.tc-settings-panel__close {
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    color: var(--tc-text);
    opacity: 0.5;
    border-radius: 6px;
    transition: opacity 0.15s;
    font-family: inherit;
    line-height: 1;
}

.tc-settings-panel__close:hover { opacity: 1; }
.tc-settings-panel__close:focus-visible {
    outline: 3px solid var(--tc-accent);
    outline-offset: 2px;
}

.tc-settings-panel__body {
    flex: 1;
    overflow-y: auto;
    padding: 4px 24px;
    -webkit-overflow-scrolling: touch;
}

.tc-settings-panel__footer {
    display: flex;
    gap: 10px;
    padding: 16px 24px 20px;
    border-top: 1px solid rgba(0,0,0,0.08);
    flex-shrink: 0;
}

.tc-settings-panel__footer .tc-btn {
    flex: 1;
    justify-content: center;
}

/* ---- Category toggle rows ---- */
.tc-toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 0;
    border-bottom: 1px solid rgba(0,0,0,0.06);
}

.tc-toggle-row:last-child { border-bottom: none; }

.tc-toggle-row__info {
    display: flex;
    flex-direction: column;
    gap: 3px;
    flex: 1;
}

.tc-toggle-row__info strong {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--tc-text);
}

.tc-toggle-row__info span {
    font-size: 0.8rem;
    opacity: 0.6;
    line-height: 1.4;
}

/* Badge "Zawsze aktywne" */
.tc-badge {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--tc-accent);
    background: rgba(37, 99, 235, 0.1);
    padding: 4px 10px;
    border-radius: 99px;
    white-space: nowrap;
    flex-shrink: 0;
    letter-spacing: 0.01em;
}

/* ---- Toggle switch ---- */
.tc-switch {
    position: relative;
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    cursor: pointer;
}

.tc-switch input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    margin: 0;
}

.tc-switch__track {
    display: block;
    width: 46px;
    height: 26px;
    background: #d1d5db;
    border-radius: 999px;
    transition: background 0.2s ease;
    position: relative;
    flex-shrink: 0;
}

.tc-switch__track::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    background: #fff;
    border-radius: 50%;
    top: 3px;
    left: 3px;
    transition: transform 0.2s ease;
    box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}

.tc-switch input:checked + .tc-switch__track {
    background: var(--tc-accent);
}

.tc-switch input:checked + .tc-switch__track::after {
    transform: translateX(20px);
}

.tc-switch input:focus-visible + .tc-switch__track {
    outline: 3px solid var(--tc-accent);
    outline-offset: 2px;
}

/* Screen reader only */
.screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}

/* ---- Mobile ---- */
@media (max-width: 640px) {
    .tc-popup__inner {
        flex-direction: column;
        padding: 16px 16px 14px;
        gap: 14px;
    }

    .tc-popup__actions {
        width: 100%;
        flex-direction: column;
    }

    .tc-popup__actions .tc-btn {
        width: 100%;
        justify-content: center;
    }

    #tc-settings-panel {
        width: 100%;
        border-radius: var(--tc-radius) var(--tc-radius) 0 0;
    }
}

/* ---- Reduced motion ---- */
@media (prefers-reduced-motion: reduce) {
    #tc-popup,
    #tc-settings-panel,
    .tc-overlay {
        transition: opacity 0.15s ease !important;
    }
}

/* =============================================
   v1.2.0 - Style: card / bar / modal
   Nowy domyslny popup w stylu CookieYes (karta)
   ============================================= */

/* ---- Card style: floating panel in corner (CookieYes-like) ---- */
.tc-popup--card {
    left: auto;
    right: auto;
    top: auto;
    bottom: 24px;
    width: 420px;
    max-width: calc(100vw - 32px);
    border-radius: 14px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.16), 0 2px 8px rgba(0,0,0,0.04);
}

.tc-popup--card.tc-popup--corner-left   { left: 24px; }
.tc-popup--card.tc-popup--corner-right  { right: 24px; }
.tc-popup--card.tc-popup--corner-center {
    left: 50%;
    transform: translateX(-50%) translateY(24px);
}
.tc-popup--card.tc-popup--corner-center.tc-visible {
    transform: translateX(-50%) translateY(0);
}

.tc-popup--card .tc-popup__inner {
    flex-direction: column;
    align-items: stretch;
    padding: 22px 22px 16px;
    max-width: none;
    margin: 0;
    gap: 14px;
}

.tc-popup--card .tc-popup__title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 2px;
}

.tc-popup--card .tc-popup__text {
    font-size: 0.85rem;
    line-height: 1.55;
    opacity: 0.78;
}

/* Buttons re-scoped under #tc-popup so the card layout (text wrap, shrink)
   beats the hardened base rule "#tc-popup .tc-btn { white-space: nowrap }".
   Without the ID the override loses on specificity and the long PL labels
   force a no-wrap row that overflows the card edge. */
#tc-popup.tc-popup--card .tc-popup__actions {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: stretch;
    gap: 8px;
    margin-top: 4px;
}

#tc-popup.tc-popup--card .tc-popup__actions .tc-btn {
    flex: 1 1 auto;
    padding: 9px 8px;
    font-size: 0.8rem;
    line-height: 1.25;
    white-space: normal;
    text-align: center;
    min-width: 0;
}

#tc-popup.tc-popup--card .tc-popup__actions .tc-btn--ghost {
    flex: 0 0 auto;
    padding: 10px 12px;
}

@media (max-width: 540px) {
    .tc-popup--card {
        left: 12px !important;
        right: 12px !important;
        bottom: 12px;
        width: auto;
        max-width: none;
    }
    .tc-popup--card.tc-popup--corner-center {
        transform: translateY(12px);
    }
    .tc-popup--card.tc-popup--corner-center.tc-visible {
        transform: translateY(0);
    }
    #tc-popup.tc-popup--card .tc-popup__actions {
        flex-direction: column;
    }
    #tc-popup.tc-popup--card .tc-popup__actions .tc-btn {
        width: 100%;
        flex: 0 0 auto;
        padding: 11px 14px;
        font-size: 0.86rem;
    }
}

/* ---- Bar style: pelnoszerokosci pasek (backward-compat) ---- */
.tc-popup--bar {
    left: 0;
    right: 0;
    width: auto;
    border-radius: 0;
}
.tc-popup--bar.tc-popup--corner-left,
.tc-popup--bar.tc-popup--corner-center {
    bottom: 0;
    top: auto;
    box-shadow: 0 -2px 20px rgba(0,0,0,0.10);
}
.tc-popup--bar.tc-popup--corner-right {
    top: 0;
    bottom: auto;
    box-shadow: 0 2px 20px rgba(0,0,0,0.10);
}
.tc-popup--bar .tc-popup__inner {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    padding: 18px 24px;
    max-width: 1280px;
    margin: 0 auto;
    gap: 20px;
}

/* ---- Modal style: srodek z backdrop ---- */
#tc-popup.tc-popup--modal {
    top: 50%;
    left: 50%;
    right: auto;
    bottom: auto;
    width: min(520px, calc(100vw - 32px));
    transform: translate(-50%, -50%) scale(0.96);
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.25);
}
#tc-popup.tc-popup--modal.tc-visible {
    transform: translate(-50%, -50%) scale(1);
}
.tc-popup--modal .tc-popup__inner {
    flex-direction: column;
    align-items: stretch;
    padding: 28px 28px 22px;
    max-width: none;
    gap: 16px;
}
#tc-popup.tc-popup--modal .tc-popup__actions {
    flex-direction: row;
    align-items: stretch;
    gap: 8px;
}
#tc-popup.tc-popup--modal .tc-popup__actions .tc-btn {
    flex: 1 1 auto;
    justify-content: center;
    white-space: normal;
    text-align: center;
    line-height: 1.25;
    min-width: 0;
}
@media (max-width: 480px) {
    #tc-popup.tc-popup--modal .tc-popup__actions {
        flex-direction: column;
    }
    #tc-popup.tc-popup--modal .tc-popup__actions .tc-btn {
        width: 100%;
        flex: 0 0 auto;
    }
}

/* ---- Powered by footer ----
   Scoped under #tc-popup (ID specificity 1,1,1) so a theme rule like
   .elementor-kit-NNN a { font-size: 20px } (specificity 0,1,1) cannot
   override the link size regardless of stylesheet load order. All font
   metrics are pinned explicitly for the same reason. */
#tc-popup .tc-popup__footer {
    margin: 0;
    padding-top: 12px;
    border-top: 1px solid rgba(0,0,0,0.07);
    font-size: 11px;
    line-height: 1;
    color: rgba(0,0,0,0.42);
    text-align: center;
}
#tc-popup .tc-popup__footer .tc-powered,
#tc-popup .tc-popup__footer a {
    font-size: 11px;
    line-height: 1;
    font-family: inherit;
    letter-spacing: 0.02em;
    text-transform: none;
    vertical-align: baseline;
}
#tc-popup .tc-popup__footer a {
    color: inherit;
    text-decoration: none;
    font-weight: 600;
    background: none;
    box-shadow: none;
    padding: 0;
    margin: 0;
}
#tc-popup .tc-popup__footer a:hover {
    color: var(--tc-accent);
    text-decoration: underline;
}

/* ---- Bar style uses inline footer to the right ---- */
#tc-popup.tc-popup--bar .tc-popup__footer {
    border-top: 0;
    padding-top: 0;
    margin-left: auto;
}

/* ---- Ghost button (Dostosuj): quiet, lowest emphasis in card/modal ---- */
#tc-popup.tc-popup--card .tc-btn--ghost,
#tc-popup.tc-popup--modal .tc-btn--ghost {
    background: transparent;
    color: var(--tc-text);
    border: 2px solid rgba(0, 0, 0, 0.12);
    opacity: 0.7;
}
#tc-popup.tc-popup--card .tc-btn--ghost:hover,
#tc-popup.tc-popup--modal .tc-btn--ghost:hover {
    border-color: rgba(0, 0, 0, 0.22);
    opacity: 1;
}

/* ================================================
   Iframe placeholder (auto-blocker)
================================================ */

.tc-iframe-ph {
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    background: var(--tc-reject-bg, #f3f4f6);
    color: var(--tc-text, #1a1a1a);
    border: 1px dashed rgba(0, 0, 0, 0.18);
    border-radius: var(--tc-radius, 12px);
    overflow: hidden;
    min-height: 160px;
    max-width: 100%;
}

.tc-iframe-ph-inner {
    text-align: center;
    padding: 20px 16px;
    max-width: 480px;
}

.tc-iframe-ph-text {
    margin: 0 0 14px;
    font-size: 14px;
    line-height: 1.5;
    color: var(--tc-text, #1a1a1a);
}

.tc-iframe-ph-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.tc-iframe-ph-btn {
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    padding: 8px 14px;
    border-radius: calc(var(--tc-radius, 12px) * 0.6);
    border: none;
    cursor: pointer;
    transition: filter 0.15s ease;
}

.tc-iframe-ph-btn:hover { filter: brightness(0.92); }

.tc-iframe-ph-btn--primary {
    background: var(--tc-accent, #2563eb);
    color: var(--tc-btn-text, #ffffff);
}

.tc-iframe-ph-btn--ghost {
    background: transparent;
    color: var(--tc-text, #1a1a1a);
    border: 1px solid rgba(0, 0, 0, 0.25);
}

/* ============================================================
   Cookie table - [tc_cookie_table] shortcode (v1.6.0)
   ============================================================ */

.tc-cookie-table-wrap {
    margin: 1.5em 0;
}

.tc-cookie-table-heading {
    margin: 1.5em 0 0.5em;
}

.tc-cookie-table-empty {
    margin: 0 0 1em;
    font-size: 0.92em;
    opacity: 0.75;
    font-style: italic;
}

.tc-cookie-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.92em;
    margin: 0 0 1em;
}

.tc-cookie-table th,
.tc-cookie-table td {
    text-align: left;
    padding: 8px 10px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.12);
    vertical-align: top;
}

.tc-cookie-table thead th {
    border-bottom: 2px solid rgba(0, 0, 0, 0.25);
    font-weight: 600;
}

.tc-cookie-table code {
    font-size: 0.95em;
    word-break: break-all;
}

.tc-cookie-badge {
    display: inline-block;
    font-size: 0.78em;
    padding: 1px 6px;
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.08);
    vertical-align: middle;
    white-space: nowrap;
}

@media (max-width: 600px) {
    .tc-cookie-table {
        font-size: 0.85em;
    }
    .tc-cookie-table th,
    .tc-cookie-table td {
        padding: 6px 6px;
    }
}

/* ============================================================
   Advanced per-button colors (v1.11.0)
   Active only when #tc-popup / #tc-settings-panel carry the
   .tc-btn-custom class (added by PHP when "Zaawansowane kolory
   przyciskow" is enabled). Variables are emitted inline in :root.
   Selector specificity (1,3,0) wins over the base button rules
   and the card/modal ghost overrides, so theme skins and the
   built-in presets cannot repaint these buttons.
   ============================================================ */

/* --- Primary (Akceptuj) --- */
#tc-popup.tc-btn-custom .tc-popup__actions .tc-btn--primary,
#tc-settings-panel.tc-btn-custom .tc-settings-panel__footer .tc-btn--primary {
    background: var(--tcb-acc-bg);
    color: var(--tcb-acc-fg);
    border-color: var(--tcb-acc-bd);
    opacity: 1;
}
#tc-popup.tc-btn-custom .tc-popup__actions .tc-btn--primary:hover,
#tc-settings-panel.tc-btn-custom .tc-settings-panel__footer .tc-btn--primary:hover {
    background: var(--tcb-acc-bg-h);
    color: var(--tcb-acc-fg-h);
    border-color: var(--tcb-acc-bd-h);
    opacity: 1;
}

/* --- Secondary (Odrzuc) --- */
#tc-popup.tc-btn-custom .tc-popup__actions .tc-btn--secondary,
#tc-settings-panel.tc-btn-custom .tc-settings-panel__footer .tc-btn--secondary {
    background: var(--tcb-rej-bg);
    color: var(--tcb-rej-fg);
    border-color: var(--tcb-rej-bd);
    opacity: 1;
}
#tc-popup.tc-btn-custom .tc-popup__actions .tc-btn--secondary:hover,
#tc-settings-panel.tc-btn-custom .tc-settings-panel__footer .tc-btn--secondary:hover {
    background: var(--tcb-rej-bg-h);
    color: var(--tcb-rej-fg-h);
    border-color: var(--tcb-rej-bd-h);
    opacity: 1;
}

/* --- Ghost (Dostosuj) --- */
#tc-popup.tc-btn-custom .tc-popup__actions .tc-btn--ghost {
    background: var(--tcb-set-bg);
    color: var(--tcb-set-fg);
    border-color: var(--tcb-set-bd);
    opacity: 1;
}
#tc-popup.tc-btn-custom .tc-popup__actions .tc-btn--ghost:hover {
    background: var(--tcb-set-bg-h);
    color: var(--tcb-set-fg-h);
    border-color: var(--tcb-set-bd-h);
    opacity: 1;
}
