/* Cookie banner and Cookie Settings panel (resources/views/components/cookie-consent.blade.php).
   Self-contained: the coming-soon and preview pages don't load Bootstrap. Follows the site's light/dark switch. */
.gc-banner,
.gc-dialog {
    --gc-bg: #ffffff;
    --gc-fg: #151515;
    --gc-muted: #5b5b5b;
    --gc-border: rgba(0, 0, 0, .14);
    --gc-btn-bg: #111111;
    --gc-btn-fg: #ffffff;
    --gc-focus: #6366f1;
    font-family: inherit;
    font-size: 15px;
    line-height: 1.5;
    color: var(--gc-fg);
    background: var(--gc-bg);
    box-sizing: border-box;
}

[data-bs-theme="dark"] .gc-banner,
[data-bs-theme="dark"] .gc-dialog,
[data-theme="dark"] .gc-banner,
[data-theme="dark"] .gc-dialog,
[data-gx-theme="dark"] .gc-banner,
[data-gx-theme="dark"] .gc-dialog {
    --gc-bg: #1c1c1e;
    --gc-fg: #f2f2f2;
    --gc-muted: #b5b5b5;
    --gc-border: rgba(255, 255, 255, .18);
    --gc-btn-bg: #f2f2f2;
    --gc-btn-fg: #111111;
}

.gc-banner *,
.gc-dialog * {
    box-sizing: border-box;
}

.gc-banner {
    position: fixed;
    z-index: 1090;
    left: 16px;
    right: 16px;
    bottom: 16px;
    max-width: 960px;
    margin: 0 auto;
    padding: 16px 20px;
    border: 1px solid var(--gc-border);
    border-radius: 12px;
    box-shadow: 0 .75rem 2.5rem rgba(0, 0, 0, .22);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 20px;
}

.gc-banner[hidden] {
    display: none;
}

.gc-text {
    flex: 1 1 360px;
    margin: 0;
    color: var(--gc-fg);
}

.gc-text p {
    margin: 0;
}

.gc-banner-title {
    margin: 0 0 4px;
    font-size: 1.05rem;
    font-weight: 600;
    line-height: 1.3;
    color: var(--gc-fg);
}

.gc-text .gc-links {
    margin-top: 6px;
}

/* "Your cookie choices have been saved." */
.gc-toast {
    position: fixed;
    z-index: 1095;
    left: 50%;
    bottom: 24px;
    transform: translateX(-50%);
    max-width: calc(100% - 32px);
    padding: 10px 18px;
    border-radius: 999px;
    background: #111111;
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    box-shadow: 0 .5rem 1.5rem rgba(0, 0, 0, .3);
    text-align: center;
}

[data-bs-theme="dark"] .gc-toast,
[data-theme="dark"] .gc-toast,
[data-gx-theme="dark"] .gc-toast {
    background: #f2f2f2;
    color: #111111;
}

.gc-toast[hidden] {
    display: none;
}

.gc-banner a,
.gc-dialog a {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.gc-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.gc-btn {
    appearance: none;
    border: 1px solid var(--gc-btn-bg);
    background: var(--gc-btn-bg);
    color: var(--gc-btn-fg);
    border-radius: 999px;
    padding: 8px 18px;
    font: inherit;
    font-weight: 600;
    line-height: 1.3;
    cursor: pointer;
}

.gc-btn-outline {
    background: transparent;
    color: var(--gc-fg);
    border-color: var(--gc-fg);
}

.gc-btn-link {
    background: transparent;
    color: var(--gc-fg);
    border-color: transparent;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.gc-btn:focus-visible,
.gc-switch:focus-visible,
.gc-banner a:focus-visible,
.gc-dialog a:focus-visible {
    outline: 2px solid var(--gc-focus);
    outline-offset: 2px;
}

.gc-dialog {
    width: min(32rem, calc(100% - 32px));
    max-height: calc(100% - 32px);
    overflow-y: auto;
    padding: 24px;
    border: 1px solid var(--gc-border);
    border-radius: 12px;
    box-shadow: 0 1rem 3rem rgba(0, 0, 0, .3);
}

.gc-dialog::backdrop {
    background: rgba(0, 0, 0, .6);
}

.gc-title {
    margin: 0 0 16px;
    font-size: 1.35rem;
    font-weight: 600;
    color: var(--gc-fg);
}

.gc-category {
    padding: 12px 0;
    border-top: 1px solid var(--gc-border);
}

.gc-category p {
    margin: 4px 0 0;
    color: var(--gc-muted);
    font-size: 14px;
}

.gc-category-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin: 0;
    color: var(--gc-fg);
}

.gc-always {
    font-size: 13px;
    font-weight: 600;
    color: var(--gc-muted);
    white-space: nowrap;
}

/* Toggle switch */
.gc-switch {
    appearance: none;
    flex: none;
    position: relative;
    width: 44px;
    height: 24px;
    margin: 0;
    border-radius: 999px;
    border: 1px solid var(--gc-border);
    background: var(--gc-border);
    cursor: pointer;
    transition: background .15s;
}

.gc-switch::after {
    content: "";
    position: absolute;
    top: 2px;
    left: 2px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 1px 2px rgba(0, 0, 0, .3);
    transition: transform .15s;
}

.gc-switch:checked {
    background: var(--gc-btn-bg);
    border-color: var(--gc-btn-bg);
}

.gc-switch:checked::after {
    transform: translateX(20px);
    background: var(--gc-btn-fg);
}

.gc-switch:disabled {
    opacity: .5;
    cursor: not-allowed;
}

.gc-note {
    margin: 12px 0 0;
    font-size: 14px;
    color: var(--gc-muted);
}

.gc-note[hidden] {
    display: none;
}

.gc-dialog .gc-actions {
    margin-top: 20px;
}

.gc-links {
    margin: 16px 0 0;
    font-size: 13px;
    color: var(--gc-muted);
}

@media (max-width: 575.98px) {
    .gc-banner {
        left: 8px;
        right: 8px;
        bottom: 8px;
        padding: 14px 16px;
    }

    .gc-banner .gc-actions,
    .gc-dialog .gc-actions {
        width: 100%;
    }

    .gc-banner .gc-btn:not(.gc-btn-link),
    .gc-dialog .gc-btn {
        flex: 1 1 auto;
    }
}
