:root {
    --academy-consent-purple: #562885;
    --academy-consent-purple-dark: #452070;
    --academy-consent-green: #356d10;
    --academy-consent-ink: #1b1c20;
    --academy-consent-muted: #5c626a;
    --academy-consent-border: #d9dedb;
}

.academy-cookie-banner {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 1060;
    padding: 20px;
    color: var(--academy-consent-ink);
    background: #fff;
    border-top: 1px solid var(--academy-consent-border);
    box-shadow: 0 -8px 24px rgba(27, 28, 32, 0.14);
}

.academy-cookie-banner__inner {
    display: flex;
    gap: 24px;
    align-items: center;
    justify-content: space-between;
    width: min(1180px, 100%);
    margin: 0 auto;
}

.academy-cookie-banner__copy {
    max-width: 680px;
}

.academy-cookie-banner h2,
.academy-cookie-dialog h2 {
    margin: 0 0 8px;
    color: var(--academy-consent-ink);
    font-size: 20px;
    line-height: 1.3;
    letter-spacing: 0;
}

.academy-cookie-banner p,
.academy-cookie-dialog p {
    margin: 0;
    color: var(--academy-consent-muted);
    font-size: 15px;
    line-height: 1.55;
    letter-spacing: 0;
}

.academy-cookie-banner__actions,
.academy-cookie-dialog__actions {
    display: flex;
    flex: 0 0 auto;
    gap: 10px;
    align-items: center;
}

.academy-cookie-banner__actions .btn,
.academy-cookie-dialog__actions .btn {
    min-height: 44px;
    padding: 9px 16px;
    border-radius: 4px;
    font-weight: 650;
    letter-spacing: 0;
    white-space: normal;
}

.academy-cookie-banner__actions .btn-primary,
.academy-cookie-dialog__actions .btn-primary {
    color: #fff;
    background: var(--academy-consent-purple);
    border-color: var(--academy-consent-purple);
}

.academy-cookie-banner__actions .btn-primary:hover,
.academy-cookie-banner__actions .btn-primary:focus,
.academy-cookie-dialog__actions .btn-primary:hover,
.academy-cookie-dialog__actions .btn-primary:focus {
    background: var(--academy-consent-purple-dark);
    border-color: var(--academy-consent-purple-dark);
}

.academy-cookie-banner__actions .btn-outline-secondary,
.academy-cookie-dialog__actions .btn-outline-secondary {
    color: var(--academy-consent-ink);
    background: #fff;
    border-color: #71777f;
}

.academy-cookie-banner__actions .btn-link {
    color: var(--academy-consent-purple);
}

.academy-cookie-dialog {
    width: min(620px, calc(100% - 32px));
    max-height: calc(100vh - 32px);
    padding: 0;
    color: var(--academy-consent-ink);
    background: #fff;
    border: 0;
    border-radius: 6px;
    box-shadow: 0 18px 56px rgba(27, 28, 32, 0.28);
}

.academy-cookie-dialog::backdrop {
    background: rgba(27, 28, 32, 0.58);
}

.academy-cookie-dialog__form {
    padding: 24px;
}

.academy-cookie-dialog__header {
    display: flex;
    gap: 16px;
    align-items: start;
    justify-content: space-between;
}

.academy-cookie-dialog__close {
    display: inline-grid;
    flex: 0 0 40px;
    width: 40px;
    height: 40px;
    padding: 0;
    place-items: center;
    color: var(--academy-consent-ink);
    font-size: 28px;
    line-height: 1;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 4px;
}

.academy-cookie-dialog__close:hover,
.academy-cookie-dialog__close:focus {
    background: #f1f3f1;
    border-color: var(--academy-consent-border);
}

.academy-cookie-options {
    padding: 0;
    margin: 22px 0;
    border: 0;
    border-top: 1px solid var(--academy-consent-border);
}

.academy-cookie-option {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 20px;
    align-items: center;
    padding: 18px 0;
    border-bottom: 1px solid var(--academy-consent-border);
}

.academy-cookie-option strong {
    display: block;
    margin-bottom: 4px;
    font-size: 16px;
}

.academy-cookie-toggle {
    display: flex;
    gap: 8px;
    align-items: center;
    margin: 0;
    color: var(--academy-consent-muted);
    font-size: 13px;
}

.academy-cookie-toggle input {
    width: 22px;
    height: 22px;
    margin: 0;
    accent-color: var(--academy-consent-green);
}

.academy-cookie-settings-control {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 8px 0;
    text-align: center;
}

.academy-cookie-settings-link {
    min-height: 36px;
    padding: 4px 8px;
    color: inherit;
    font: inherit;
    text-decoration: underline;
    text-underline-offset: 3px;
    background: transparent;
    border: 0;
}

.academy-cookie-settings-link:hover,
.academy-cookie-settings-link:focus {
    color: var(--academy-consent-purple);
}

.academy-cookie-no-scroll {
    overflow: hidden;
}

@media (max-width: 900px) {
    .academy-cookie-banner__inner {
        align-items: stretch;
        flex-direction: column;
        gap: 16px;
    }

    .academy-cookie-banner__actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .academy-cookie-banner__actions .btn-link {
        grid-column: 1 / -1;
    }
}

@media (max-width: 520px) {
    .academy-cookie-banner {
        padding: 16px;
    }

    .academy-cookie-banner__actions,
    .academy-cookie-dialog__actions {
        display: grid;
        grid-template-columns: 1fr;
        width: 100%;
    }

    .academy-cookie-banner__actions .btn-link {
        grid-column: auto;
    }

    .academy-cookie-dialog__form {
        padding: 20px;
    }

    .academy-cookie-option {
        gap: 12px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .academy-cookie-banner *,
    .academy-cookie-dialog * {
        scroll-behavior: auto !important;
        transition: none !important;
    }
}
