/* ==========================================================================
   Bright Toolkit — Consent Banner (standalone, pode carregar sem DS tokens)

   Nota: tokens do Bright Design System são preferidos. Se DS não carregou,
   os fallbacks hardcoded abaixo garantem banner visível.
   ========================================================================== */

:root {
    --bc-consent-height: 0px;
}
body.bc-has-consent {
    padding-bottom: var(--bc-consent-height);
    transition: padding-bottom 0.2s ease;
}
.bc-cookie-consent {
    position: fixed;
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
    max-width: 720px;
    margin: 0 auto;
    background: var(--bg-surface-1, #0f172a);
    border: 1px solid var(--border-accent, #fde047);
    border-radius: var(--radius-xl, 24px);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.4);
    z-index: 950;
    overflow: hidden;
    color: var(--text-primary, #fff);
    font-family: var(--font-sans, "Inter", system-ui, sans-serif);
    animation: bcConsentSlideIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes bcConsentSlideIn {
    from { transform: translateY(20px); opacity: 0; }
    to   { transform: translateY(0); opacity: 1; }
}

.bc-cookie-consent__compact {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 1.25rem;
    padding: 1.25rem 1.5rem;
}

.bc-cookie-consent__icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-surface-2, #1e293b);
    border-radius: 9999px;
    font-size: 1.25rem;
}

.bc-cookie-consent__text strong {
    display: block;
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.bc-cookie-consent__text span {
    color: var(--text-secondary, #a1a1aa);
    font-size: 0.875rem;
    line-height: 1.3;
}

.bc-cookie-consent__text a {
    color: var(--accent-secondary, #22d3ee);
    text-decoration: underline;
}

.bc-cookie-consent__actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.bc-cookie-consent__btn {
    padding: 0.55rem 1.1rem;
    font-size: 0.875rem;
    font-weight: 700;
    border-radius: 9999px;
    border: 1px solid var(--border-default, rgba(255, 255, 255, 0.16));
    background: transparent;
    color: var(--text-primary, #fff);
    font-family: inherit;
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
}
.bc-cookie-consent__btn:hover {
    border-color: var(--accent-primary, #fde047);
    color: var(--accent-primary, #fde047);
}

.bc-cookie-consent__btn--primary {
    background: linear-gradient(135deg, #fde047 0%, #ca8a04 100%);
    color: #000;
    border-color: transparent;
}
.bc-cookie-consent__btn--primary:hover {
    transform: translateY(-1px);
    color: #000;
}

.bc-cookie-consent__expanded {
    padding: 1.5rem;
    border-top: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.08));
}

.bc-cookie-consent.is-expanded .bc-cookie-consent__compact {
    border-bottom: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.08));
}

.bc-cookie-consent__category {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 1rem;
    align-items: flex-start;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.08));
}
.bc-cookie-consent__category:last-of-type { border-bottom: none; }

.bc-cookie-consent__category-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-surface-2, #1e293b);
    border-radius: 8px;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.bc-cookie-consent__category-info h4 {
    font-size: 1rem;
    font-weight: 700;
    margin: 0 0 0.25rem;
}

.bc-cookie-consent__category-info p {
    color: var(--text-secondary, #a1a1aa);
    font-size: 0.875rem;
    line-height: 1.3;
    margin: 0;
}

.bc-cookie-consent__category-info small {
    display: block;
    margin-top: 0.4rem;
    color: var(--text-tertiary, #71717a);
    font-family: ui-monospace, Menlo, monospace;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
}

/* Toggle switch */
.bc-toggle {
    position: relative;
    width: 40px;
    height: 22px;
    flex-shrink: 0;
}
.bc-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}
.bc-toggle__slider {
    position: absolute;
    inset: 0;
    background: var(--bg-surface-3, #334155);
    border-radius: 9999px;
    cursor: pointer;
    transition: background 0.15s;
}
.bc-toggle__slider::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 18px;
    height: 18px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.15s;
}
.bc-toggle input:checked + .bc-toggle__slider {
    background: var(--accent-primary, #fde047);
}
.bc-toggle input:checked + .bc-toggle__slider::before {
    transform: translateX(18px);
}
.bc-toggle input:disabled + .bc-toggle__slider {
    opacity: 0.5;
    cursor: not-allowed;
}

.bc-cookie-consent__save {
    margin-top: 1rem;
    width: 100%;
}

@media (max-width: 640px) {
    .bc-cookie-consent__compact { grid-template-columns: 1fr; gap: 1rem; }
    .bc-cookie-consent__icon { width: 32px; height: 32px; }
    .bc-cookie-consent__actions { width: 100%; justify-content: stretch; }
    .bc-cookie-consent__btn { flex: 1; }
}
