/* =====================================================
   Cookie Bar Tobias Franzel v2.3.0
===================================================== */

:root {
    --cb-bg:          #ffffff;
    --cb-hatch:       rgba(0,0,0,0.07);
    --cb-border:      #e0e0e0;
    --cb-text:        #1a1a1a;
    --cb-text-muted:  #555555;
    --cb-accent:      #2563eb;
    --cb-accent-text: #ffffff;
    --cb-btn-ghost-bg:#f4f4f4;
    --cb-btn-ghost-fg:#333333;
    --cb-toggle-off:  #cccccc;
    --cb-radius:      0px;
    --cb-shadow:      0 -4px 24px rgba(0,0,0,0.10);
}

@media (prefers-color-scheme: dark) {
    :root.cb-mode-auto {
        --cb-bg:          #161616;
        --cb-hatch:       rgba(255,255,255,0.05);
        --cb-border:      #2e2e2e;
        --cb-text:        #f0f0f0;
        --cb-text-muted:  #aaaaaa;
        --cb-accent:      #3b82f6;
        --cb-accent-text: #ffffff;
        --cb-btn-ghost-bg:#242424;
        --cb-btn-ghost-fg:#dddddd;
        --cb-toggle-off:  #444444;
        --cb-shadow:      0 -4px 32px rgba(0,0,0,0.40);
    }
}

:root.cb-mode-dark {
    --cb-bg:          #161616;
    --cb-hatch:       rgba(255,255,255,0.05);
    --cb-border:      #2e2e2e;
    --cb-text:        #f0f0f0;
    --cb-text-muted:  #aaaaaa;
    --cb-accent:      #3b82f6;
    --cb-accent-text: #ffffff;
    --cb-btn-ghost-bg:#242424;
    --cb-btn-ghost-fg:#dddddd;
    --cb-toggle-off:  #444444;
    --cb-shadow:      0 -4px 32px rgba(0,0,0,0.40);
}

#cb-overlay {
    position: fixed;
    inset: 0;
    z-index: 99990;
    background: rgba(0,0,0,0.45);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}
#cb-overlay.cb-show { opacity: 1; pointer-events: all; }

#cb-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 99999;
    background-color: var(--cb-bg);
    background-image: repeating-linear-gradient(45deg, var(--cb-hatch) 0px, var(--cb-hatch) 1px, transparent 1px, transparent 8px);
    border-top: 2px solid var(--cb-border);
    box-shadow: var(--cb-shadow);
    color: var(--cb-text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 14px;
    line-height: 1.6;
    transform: translateY(110%);
    transition: transform 0.5s cubic-bezier(0.16,1,0.3,1);
}
#cb-bar.cb-show { transform: translateY(0); }

#cb-bar-inner { max-width: 960px; margin: 0 auto; padding: 24px 28px 20px; }
#cb-bar-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; gap: 16px; }
#cb-bar-title { font-size: 16px; font-weight: 700; color: var(--cb-text); margin: 0; }
#cb-bar-close { background: none; border: none; cursor: pointer; font-size: 20px; color: var(--cb-text-muted); padding: 2px 6px; line-height: 1; transition: color 0.2s; flex-shrink: 0; }
#cb-bar-close:hover { color: var(--cb-text); }
#cb-bar-text { color: var(--cb-text-muted); font-size: 13px; margin: 0 0 16px; }
#cb-bar-text a { color: var(--cb-accent); text-decoration: underline; }
#cb-no-tracking { display: inline-flex; align-items: center; gap: 6px; background: var(--cb-btn-ghost-bg); border: 1px solid var(--cb-border); color: var(--cb-text-muted); font-size: 12px; padding: 4px 10px; margin-bottom: 16px; font-weight: 500; }
#cb-no-tracking::before { content: "✓"; color: #16a34a; font-weight: 700; }
#cb-categories { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; }
.cb-cat { display: flex; align-items: center; gap: 8px; background: var(--cb-btn-ghost-bg); border: 1px solid var(--cb-border); padding: 8px 12px; font-size: 13px; color: var(--cb-text); flex: 1; min-width: 160px; }
.cb-cat-name { font-weight: 600; flex: 1; }
.cb-cat-desc { font-size: 11px; color: var(--cb-text-muted); margin-top: 2px; }
.cb-cat-info { display: flex; flex-direction: column; flex: 1; }
.cb-toggle { position: relative; width: 40px; height: 22px; flex-shrink: 0; }
.cb-toggle input { opacity: 0; width: 0; height: 0; position: absolute; }
.cb-toggle-track { position: absolute; inset: 0; background: var(--cb-toggle-off); border-radius: 22px; cursor: pointer; transition: background 0.2s; }
.cb-toggle-track::before { content: ''; position: absolute; width: 16px; height: 16px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: transform 0.2s; box-shadow: 0 1px 3px rgba(0,0,0,0.2); }
.cb-toggle input:checked + .cb-toggle-track { background: var(--cb-accent); }
.cb-toggle input:checked + .cb-toggle-track::before { transform: translateX(18px); }
.cb-toggle input:disabled + .cb-toggle-track { background: var(--cb-accent); cursor: not-allowed; opacity: 0.75; }
.cb-toggle input:disabled + .cb-toggle-track::before { transform: translateX(18px); }
#cb-buttons { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.cb-btn { padding: 10px 20px; font-size: 13px; font-weight: 600; border: 2px solid transparent; cursor: pointer; transition: opacity 0.2s, transform 0.15s; white-space: nowrap; border-radius: var(--cb-radius); letter-spacing: 0.02em; }
.cb-btn:hover { opacity: 0.85; transform: translateY(-1px); }
.cb-btn:active { transform: translateY(0); }
.cb-btn-primary { background: var(--cb-accent); color: var(--cb-accent-text); }
.cb-btn-ghost { background: var(--cb-btn-ghost-bg); color: var(--cb-btn-ghost-fg); border-color: var(--cb-border); }
.cb-btn-save { background: transparent; color: var(--cb-accent); border-color: var(--cb-accent); }
#cb-links { margin-top: 12px; display: flex; gap: 16px; }
#cb-links a { font-size: 11px; color: var(--cb-text-muted); text-decoration: none; transition: color 0.2s; }
#cb-links a:hover { color: var(--cb-accent); }

#cb-floating-btn {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 99989;
    width: 52px;
    height: 52px;
    background-color: rgba(255,255,255,0.15);
    background-image: repeating-linear-gradient(45deg, rgba(0,0,0,0.04) 0px, rgba(0,0,0,0.04) 1px, transparent 1px, transparent 8px);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.25);
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s, box-shadow 0.2s, opacity 0.3s;
    opacity: 0;
    pointer-events: none;
    border-radius: var(--cb-radius);
    padding: 0;
    overflow: visible;
}
#cb-floating-btn.cb-show { opacity: 1; pointer-events: all; }
#cb-floating-btn:hover { transform: scale(1.08); box-shadow: 0 6px 20px rgba(0,0,0,0.2); }
#cb-floating-btn svg { width: 34px; height: 34px; display: block; overflow: visible; animation: cb-cookie-rotate 30s linear infinite; transform-origin: center; }
#cb-floating-btn:hover svg { animation-duration: 8s; }
@keyframes cb-cookie-rotate { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

.cb-media-placeholder { display: flex; align-items: center; justify-content: center; min-height: 200px; background: var(--cb-btn-ghost-bg); border: 1px solid var(--cb-border); background-image: repeating-linear-gradient(45deg,rgba(0,0,0,0.04) 0px,rgba(0,0,0,0.04) 1px,transparent 1px,transparent 8px); }
.cb-media-inner { text-align: center; padding: 20px; }
.cb-media-icon { font-size: 32px; display: block; margin-bottom: 8px; }
.cb-media-inner p { margin: 0 0 4px; font-weight: 600; font-size: 14px; color: var(--cb-text); }
.cb-media-inner small { font-size: 12px; color: var(--cb-text-muted); }
.cb-noscript-notice { position: fixed; bottom: 0; left: 0; right: 0; background: #1a1a1a; color: #fff; text-align: center; padding: 14px; font-size: 13px; z-index: 99999; }

@media (max-width: 600px) {
    #cb-bar-inner { padding: 18px 16px 16px; }
    #cb-categories { flex-direction: column; }
    .cb-cat { min-width: unset; }
    #cb-buttons { flex-direction: column; }
    .cb-btn { width: 100%; text-align: center; }
    #cb-floating-btn { bottom: 16px; left: 16px; width: 46px; height: 46px; }
    #cb-floating-btn svg { width: 30px; height: 30px; }
}
