/* Cookie consent banner (Google Consent Mode v2 aware).
   Namespaced with .bgc- so it is safe on Tailwind and Bootstrap pages. */

.bgc-root,
.bgc-root * {
    box-sizing: border-box;
}

.bgc-root[hidden],
.bgc-root [hidden] {
    display: none !important;
}

.bgc-root {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 2147483000;
    display: flex;
    justify-content: center;
    padding: 16px;
    pointer-events: none;
    color: #0f172a;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 15px;
    line-height: 1.55;
    text-align: left;
}

.bgc-card {
    pointer-events: auto;
    width: 100%;
    max-width: 1080px;
    padding: 20px;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    background: #ffffff;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.18);
}

.bgc-title {
    margin: 0 0 6px;
    color: #0f172a;
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.3;
}

.bgc-text {
    margin: 0;
    color: #475569;
    font-size: 0.95rem;
}

.bgc-text a,
.bgc-prefs-note a {
    color: #1d4ed8;
    text-decoration: underline;
}

.bgc-layout {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    justify-content: space-between;
}

.bgc-copy {
    min-width: 0;
    flex: 1 1 auto;
}

.bgc-actions {
    display: flex;
    flex-shrink: 0;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
}

.bgc-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 8px 16px;
    border: 1px solid transparent;
    border-radius: 8px;
    font: inherit;
    font-weight: 600;
    line-height: 1.2;
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

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

.bgc-btn-primary {
    background: #1d4ed8;
    color: #ffffff;
}

.bgc-btn-primary:hover {
    background: #1e40af;
}

.bgc-btn-outline {
    border-color: #cbd5e1;
    background: #ffffff;
    color: #0f172a;
}

.bgc-btn-outline:hover {
    border-color: #94a3b8;
    background: #f8fafc;
}

.bgc-btn-ghost {
    padding-right: 4px;
    padding-left: 4px;
    border-color: transparent;
    background: transparent;
    color: #1d4ed8;
}

.bgc-btn-ghost:hover {
    text-decoration: underline;
}

.bgc-prefs-view {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.bgc-prefs-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.bgc-prefs-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.bgc-toggle {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #f8fafc;
}

.bgc-toggle input {
    width: 18px;
    height: 18px;
    margin: 2px 0 0;
    flex: 0 0 auto;
    accent-color: #1d4ed8;
}

.bgc-toggle input:disabled {
    opacity: 0.65;
}

.bgc-toggle-body {
    min-width: 0;
}

.bgc-toggle-label {
    display: block;
    color: #0f172a;
    font-weight: 600;
}

.bgc-toggle-desc {
    display: block;
    margin-top: 2px;
    color: #64748b;
    font-size: 0.875rem;
}

.bgc-prefs-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
}

.bgc-link {
    padding: 0;
    border: 0;
    background: none;
    color: inherit;
    font: inherit;
    cursor: pointer;
    text-decoration: none;
}

.bgc-link:hover,
.bgc-link:focus-visible {
    text-decoration: underline;
}

@media (max-width: 760px) {
    .bgc-root {
        padding: 10px;
    }

    .bgc-card {
        padding: 16px;
        border-radius: 12px;
    }

    .bgc-layout {
        flex-direction: column;
        gap: 14px;
    }

    .bgc-actions {
        width: 100%;
        justify-content: stretch;
    }

    .bgc-actions .bgc-btn {
        flex: 1 1 auto;
    }

    .bgc-prefs-actions {
        justify-content: stretch;
    }

    .bgc-prefs-actions .bgc-btn {
        flex: 1 1 auto;
    }
}

@media (prefers-reduced-motion: reduce) {
    .bgc-btn {
        transition: none;
    }
}

@media print {
    .bgc-root {
        display: none !important;
    }
}
