.affaicb-cookiebar {
    position: fixed;
    inset: auto 24px 24px 24px;
    z-index: 999999;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    color: #111827;
}

.affaicb-shell {
    max-width: 980px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.9fr);
    gap: 16px;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(17, 24, 39, 0.12);
    border-radius: 22px;
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.22);
    backdrop-filter: blur(18px);
    padding: 22px;
}

.affaicb-content,
.affaicb-panel {
    min-width: 0;
}

.affaicb-badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    background: #e0f2fe;
    color: #075985;
    font-size: 12px;
    font-weight: 700;
    padding: 5px 10px;
    margin-bottom: 10px;
}

.affaicb-title {
    margin: 0 0 8px;
    font-size: 22px;
    line-height: 1.25;
    color: #0f172a;
}

.affaicb-text {
    margin: 0 0 14px;
    color: #475569;
    font-size: 14px;
    line-height: 1.6;
}

.affaicb-ai-box {
    display: grid;
    gap: 4px;
    background: linear-gradient(135deg, #eff6ff, #f8fafc);
    border: 1px solid #bfdbfe;
    border-radius: 14px;
    padding: 12px 14px;
    margin: 14px 0;
    color: #1e3a8a;
    font-size: 13px;
    line-height: 1.5;
}

.affaicb-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
}

.affaicb-btn {
    border: 0;
    cursor: pointer;
    border-radius: 999px;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 700;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.affaicb-btn:focus {
    outline: 3px solid #93c5fd;
    outline-offset: 2px;
}

.affaicb-btn:hover {
    transform: translateY(-1px);
}

.affaicb-btn-primary {
    background: #2563eb;
    color: #ffffff;
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.25);
}

.affaicb-btn-secondary {
    background: #111827;
    color: #ffffff;
}

.affaicb-btn-ghost {
    background: #f1f5f9;
    color: #0f172a;
}

.affaicb-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
    margin-top: 14px;
    font-size: 13px;
}

.affaicb-links a,
.affaicb-link-button {
    color: #2563eb;
    background: transparent;
    border: 0;
    padding: 0;
    cursor: pointer;
    text-decoration: underline;
    font: inherit;
}

.affaicb-panel {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    padding: 16px;
}

.affaicb-panel h3 {
    margin: 0 0 12px;
    font-size: 18px;
    color: #0f172a;
}

.affaicb-category {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    border-top: 1px solid #e2e8f0;
    padding: 12px 0;
}

.affaicb-category:first-of-type {
    border-top: 0;
}

.affaicb-category strong {
    display: block;
    margin-bottom: 4px;
    color: #111827;
}

.affaicb-category p {
    margin: 0;
    color: #64748b;
    font-size: 13px;
    line-height: 1.45;
}

.affaicb-switch {
    position: relative;
    display: inline-flex;
    width: 48px;
    height: 28px;
}

.affaicb-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.affaicb-switch span {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: #cbd5e1;
    border-radius: 999px;
    transition: background 0.18s ease;
}

.affaicb-switch span::before {
    content: "";
    position: absolute;
    width: 22px;
    height: 22px;
    left: 3px;
    top: 3px;
    background: #ffffff;
    border-radius: 999px;
    transition: transform 0.18s ease;
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.25);
}

.affaicb-switch input:checked + span {
    background: #2563eb;
}

.affaicb-switch input:checked + span::before {
    transform: translateX(20px);
}

.affaicb-actions-panel {
    margin-top: 12px;
}

@media (max-width: 860px) {
    .affaicb-cookiebar {
        inset: auto 12px 12px 12px;
    }

    .affaicb-shell {
        grid-template-columns: 1fr;
        padding: 18px;
        border-radius: 18px;
    }

    .affaicb-actions {
        flex-direction: column;
    }

    .affaicb-btn {
        width: 100%;
    }
}
