/* ── Geekon Consent Banner v1.2.2 ────────────────────────────── */

/* Trigger — heavily defensive to survive any theme CSS */
#geekon-consent-trigger {
    position: fixed !important;
    bottom: 20px !important;
    left: 20px !important;
    width: 48px !important;
    height: 48px !important;
    min-width: 48px !important;
    max-width: 48px !important;
    min-height: 48px !important;
    max-height: 48px !important;
    padding: 0 !important;
    margin: 0 !important;
    background: var(--gc-trigger-bg, #1a1a2e) !important;
    border: none !important;
    border-radius: 50% !important;
    cursor: pointer !important;
    z-index: 99998 !important;
    box-shadow: 0 4px 16px rgba(0,0,0,.28) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: transform .2s, box-shadow .2s !important;
    line-height: 1 !important;
    outline: none !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
}
#geekon-consent-trigger:hover {
    transform: scale(1.12) !important;
    box-shadow: 0 6px 24px rgba(0,0,0,.35) !important;
}
/* SVG icon wrapper */
#geekon-consent-trigger .geekon-trigger-icon {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 22px !important;
    height: 22px !important;
    pointer-events: none !important;
}
#geekon-consent-trigger .geekon-trigger-icon svg {
    display: block !important;
    width: 22px !important;
    height: 22px !important;
    color: #ffffff !important;
    fill: #ffffff !important;
}
/* Hide via class */
#geekon-consent-trigger.gc-trigger-hidden { display: none !important; }

/* Overlay */
#geekon-consent-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.5);
    z-index: 99998;
    backdrop-filter: blur(2px);
}
#geekon-consent-overlay.gc-ov-active { display: block; }

/* Banner wrapper */
#geekon-consent-banner {
    z-index: 99999;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 15px;
}
#geekon-consent-banner.gc-banner-hidden { display: none; }

/* Positions */
.gc-banner { position: fixed; }
.gc-pos-bottom       { bottom: 0; left: 0; right: 0; }
.gc-pos-bottom-left  { bottom: 20px; left: 20px; max-width: 420px; width: calc(100vw - 40px); }
.gc-pos-bottom-right { bottom: 20px; right: 20px; max-width: 420px; width: calc(100vw - 40px); }
.gc-pos-center       { top: 50%; left: 50%; transform: translate(-50%,-50%); max-width: 580px; width: calc(100vw - 40px); }

/* Panel */
.gc-panel {
    background: var(--gc-panel-bg, #fff);
    border-top: var(--gc-panel-border-w, 4px) solid var(--gc-panel-border, #1a1a2e);
    box-shadow: 0 -4px 32px rgba(0,0,0,.14);
    overflow: hidden;
    opacity: 0;
    transform: translateY(14px);
    transition: opacity .3s ease, transform .3s cubic-bezier(.25,.8,.25,1);
}
.gc-pos-bottom-left .gc-panel,
.gc-pos-bottom-right .gc-panel {
    border-radius: var(--gc-panel-radius, 12px);
    box-shadow: 0 8px 40px rgba(0,0,0,.18);
}
.gc-pos-center .gc-panel {
    border-radius: var(--gc-panel-radius, 12px);
    transform: scale(.96);
    box-shadow: 0 20px 60px rgba(0,0,0,.2);
}
.gc-panel.gc-in  { opacity: 1; transform: none; }
.gc-panel.gc-out { opacity: 0; transform: translateY(14px); }
.gc-pos-center .gc-panel.gc-out { transform: scale(.96); }

/* Views */
.gc-view { padding: 20px 20px 16px; }
.gc-view[hidden] { display: none; }

/* Header */
.gc-header { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 14px; }
.gc-emoji  { font-size: 26px; flex-shrink: 0; line-height: 1; }
.gc-title  { font-size: 16px; font-weight: 700; margin: 0 0 4px; color: #111; line-height: 1.3; }
.gc-prefs-title { margin-bottom: 14px; font-size: 16px; }
.gc-body   { font-size: 13px; color: #555; margin: 0; line-height: 1.5; }
.gc-pp-link { color: var(--gc-btn-accept-bg, #1a1a2e); text-decoration: underline; }

/* ── Buttons ──────────────────────────────────────────────────────
   GDPR: equal visual weight — same size, border, font weight.
   Layout: 3 buttons in a row on wide screens, stack on narrow.
──────────────────────────────────────────────────────────────── */
.gc-btns {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;        /* wraps if no room */
}

.gc-btn {
    flex: 1 1 120px;        /* grow, shrink, but not below 120px before wrapping */
    padding: 10px 14px;
    font-size: 13px;
    font-weight: 600;
    border-radius: var(--gc-btn-radius, 7px);
    cursor: pointer;
    border: 2px solid transparent;
    transition: filter .15s;
    text-align: center;
    white-space: nowrap;
    font-family: inherit;
    line-height: 1.2;
}
.gc-btn:hover { filter: brightness(1.08); }

.gc-btn-accept {
    background:   var(--gc-btn-accept-bg,  #1a1a2e);
    color:        var(--gc-btn-accept-text, #ffffff);
    border-color: var(--gc-btn-accept-bg,  #1a1a2e);
}
.gc-btn-reject {
    background:   var(--gc-btn-reject-bg,     #ffffff);
    color:        var(--gc-btn-reject-text,    #1a1a2e);
    border-color: var(--gc-btn-reject-border,  #1a1a2e);
}
.gc-btn-customize {
    background:   var(--gc-btn-custom-bg,  transparent);
    color:        var(--gc-btn-custom-text, #1a1a2e);
    border-color: var(--gc-btn-custom-text, #1a1a2e);
    border-style: dashed;
}

/* Full-width bottom banner: buttons always in a row, equal width */
.gc-pos-bottom .gc-btn { flex: 1 1 auto; }

/* Stack buttons when banner is too narrow to fit all 3 */
@container gc-btns (max-width: 360px) {
    .gc-btn { flex: 1 1 100%; }
}

/* Prefs */
.gc-cats {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 52vh;
    overflow-y: auto;
    padding-right: 2px;
    margin-bottom: 14px;
}

/* Category row */
.gc-cat { border: 1px solid #e5e7eb; border-radius: 8px; overflow: hidden; }
.gc-cat-top { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; gap: 10px; }
.gc-cat-info { flex: 1; min-width: 0; }
.gc-cat-name { font-weight: 600; font-size: 14px; color: #111; }
.gc-cat-desc { font-size: 12px; color: #777; margin-top: 2px; line-height: 1.4; }
.gc-cat-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }

/* "Pokaż cookie" badge */
.gc-show-cookies {
    background:    var(--gc-badge-bg,     #1a1a2e);
    color:         var(--gc-badge-text,   #ffffff);
    border:        none;
    border-radius: var(--gc-badge-radius, 20px);
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: opacity .15s, transform .15s;
    font-family: inherit;
}
.gc-show-cookies:hover { opacity: .85; transform: scale(1.03); }

/* Cookie detail */
.gc-cat-detail { background: #fafafa; border-top: 1px solid #e5e7eb; padding: 10px 14px; }
.gc-cat-detail[hidden] { display: none; }
.gc-ctable { width: 100%; border-collapse: collapse; font-size: 12px; }
.gc-ctable th { color: #888; font-weight: 500; padding: 4px 8px; text-align: left; border-bottom: 1px solid #e5e7eb; }
.gc-ctable td { padding: 6px 8px; border-bottom: 1px solid #f0f0f0; vertical-align: top; }
.gc-ctable tr:last-child td { border-bottom: none; }
.gc-ctable code { background: #eff6ff; color: #1e40af; padding: 1px 5px; border-radius: 3px; font-size: 11px; }
.gc-cdesc { color: #999; font-size: 11px; margin-top: 2px; }
.gc-no-items { color: #aaa; font-size: 12px; margin: 4px 0; }

/* Toggle */
.gc-toggle { position: relative; display: flex; align-items: center; gap: 8px; cursor: pointer; }
.gc-toggle input { position: absolute; opacity: 0; width: 0; height: 0; }
.gc-slider {
    display: block; width: 44px; height: 24px;
    background: #d1d5db; border-radius: 12px;
    transition: background .2s; flex-shrink: 0; position: relative;
}
.gc-slider::before {
    content: ''; position: absolute;
    width: 18px; height: 18px; left: 3px; top: 3px;
    background: #fff; border-radius: 50%;
    transition: transform .2s; box-shadow: 0 1px 3px rgba(0,0,0,.2);
}
.gc-toggle input:checked + .gc-slider { background: var(--gc-toggle, #1a1a2e); }
.gc-toggle input:checked + .gc-slider::before { transform: translateX(20px); }
.gc-locked .gc-slider { background: #9ca3af; cursor: not-allowed; }
.gc-locked input:checked + .gc-slider { background: #6b7280; }
.gc-always-on { font-size: 11px; color: #888; white-space: nowrap; }

/* Scrollbar */
.gc-cats::-webkit-scrollbar { width: 4px; }
.gc-cats::-webkit-scrollbar-track { background: transparent; }
.gc-cats::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 2px; }

/* ── Responsive breakpoints ──────────────────────────────────── */

/* Narrow popup / modal */
@media (max-width: 480px) {
    .gc-pos-bottom-left,
    .gc-pos-bottom-right {
        left: 10px; right: 10px; bottom: 10px;
        max-width: 100%; width: auto;
    }
    .gc-view { padding: 16px 16px 14px; }
}

/* Very narrow — stack all buttons vertically */
@media (max-width: 400px) {
    .gc-btns { flex-direction: column; }
    .gc-btn  { flex: none; width: 100%; }
}
