/* Cookie Consent — Premium UI (Scriptfabrik / Auxbid style) */

:root {
    --cc-primary: #0c4a5c;
    --cc-primary-hover: #083540;
    --cc-surface: #ffffff;
    --cc-surface-alt: #f6f8fa;
    --cc-border: #e2e8ec;
    --cc-text: #1a2b33;
    --cc-text-muted: #5c6f7a;
    --cc-radius: 16px;
    --cc-shadow: 0 12px 40px rgba(12, 74, 92, 0.18);
    --cc-font: 'DM Sans', system-ui, -apple-system, sans-serif;
}

[data-theme="dark"] {
    --cc-surface: #0f171c;
    --cc-surface-alt: #141e25;
    --cc-border: #24333d;
    --cc-text: #e8f0f4;
    --cc-text-muted: #8aa3b0;
    --cc-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
}

.cc-banner-host {
    position: fixed;
    z-index: 1080;
    pointer-events: none;
    inset: auto 0 1.25rem 0;
    display: flex;
    justify-content: center;
    padding: 0 1rem;
}

.cc-banner-host.is-visible {
    pointer-events: auto;
}

.cc-banner-host[data-position="bottom-left"] {
    justify-content: flex-start;
}

.cc-banner-host[data-position="bottom-right"] {
    justify-content: flex-end;
}

.cc-banner {
    font-family: var(--cc-font);
    width: min(920px, 100%);
    background: var(--cc-surface);
    border: 1px solid var(--cc-border);
    border-radius: var(--cc-radius);
    box-shadow: var(--cc-shadow);
    padding: 1.25rem 1.5rem;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 1rem 1.5rem;
    align-items: center;
    animation: cc-slide-up 0.35s ease;
}

@keyframes cc-slide-up {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

.cc-banner__main {
    min-width: 0;
}

.cc-banner__badge {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #fff;
    background: var(--cc-primary);
    border-radius: 999px;
    padding: 0.2rem 0.65rem;
    margin-bottom: 0.5rem;
}

.cc-banner__title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--cc-text);
    margin: 0 0 0.35rem;
}

.cc-banner__text {
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--cc-text-muted);
    margin: 0 0 0.5rem;
}

.cc-banner__text p {
    margin: 0 0 0.35rem;
}

.cc-cat__desc {
    font-size: 0.85rem;
    color: var(--cc-text-muted);
    margin: 0;
}

.cc-cat__desc p {
    margin: 0;
}

.cc-banner__links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    font-size: 0.82rem;
}

.cc-banner__links a {
    color: color-mix(in srgb, var(--cc-primary) 55%, #7ec8e3);
    text-decoration: underline;
    font-weight: 500;
}

.cc-banner__links a:hover {
    color: color-mix(in srgb, var(--cc-primary) 35%, #b8e4f0);
}

[data-theme="dark"] .cc-banner__links a {
    color: #8ecae0;
}

[data-theme="dark"] .cc-banner__links a:hover {
    color: #b8e4f0;
}

.cc-banner__actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    min-width: 180px;
}

.cc-btn {
    font-family: inherit;
    font-size: 0.88rem;
    font-weight: 600;
    border-radius: 10px;
    padding: 0.55rem 1rem;
    border: 1px solid transparent;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
    text-align: center;
    white-space: nowrap;
}

.cc-btn--primary {
    background: var(--cc-primary);
    color: #fff;
    border-color: var(--cc-primary);
}

.cc-btn--primary:hover {
    background: var(--cc-primary-hover);
}

.cc-btn--ghost {
    background: var(--cc-surface);
    color: var(--cc-text);
    border-color: var(--cc-border);
}

.cc-btn--ghost:hover {
    background: var(--cc-surface-alt);
}

.cc-btn--success {
    background: #16a34a;
    color: #fff;
    border-color: #16a34a;
}

.cc-btn--success:hover {
    background: #15803d;
    border-color: #15803d;
}

/* Modal */
.cc-modal-host.is-open {
    position: fixed;
    inset: 0;
    z-index: 1090;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: rgba(10, 18, 22, 0.55);
    backdrop-filter: blur(4px);
}

.cc-modal {
    font-family: var(--cc-font);
    width: min(720px, 100%);
    max-height: min(90vh, 820px);
    overflow: auto;
    background: var(--cc-surface);
    border-radius: var(--cc-radius);
    box-shadow: var(--cc-shadow);
    border: 1px solid var(--cc-border);
}

.cc-modal__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--cc-border);
}

.cc-modal__title {
    font-size: 1.2rem;
    font-weight: 700;
    margin: 0;
    color: var(--cc-text);
}

.cc-modal__intro {
    font-size: 0.88rem;
    color: var(--cc-text-muted);
    margin: 0.35rem 0 0;
    line-height: 1.5;
}

.cc-modal__close {
    background: none;
    border: none;
    font-size: 1.5rem;
    line-height: 1;
    color: var(--cc-text-muted);
    cursor: pointer;
    padding: 0.25rem;
}

.cc-modal__body {
    padding: 1rem 1.5rem;
}

.cc-cat {
    border: 1px solid var(--cc-border);
    border-radius: 12px;
    padding: 1rem 1.1rem;
    margin-bottom: 0.75rem;
    background: var(--cc-surface-alt);
}

.cc-cat__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.cc-cat__icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: color-mix(in srgb, var(--cc-primary) 12%, transparent);
    color: var(--cc-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}

.cc-cat__meta {
    flex: 1;
    min-width: 0;
}

.cc-cat__name {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--cc-text);
    margin: 0 0 0.2rem;
}

.cc-cat__desc {
    font-size: 0.82rem;
    color: var(--cc-text-muted);
    margin: 0;
    line-height: 1.45;
}

.cc-cat__status {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--cc-text-muted);
    white-space: nowrap;
}

.cc-switch {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.cc-switch input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.cc-switch__track {
    width: 44px;
    height: 24px;
    background: #c5d0d6;
    border-radius: 999px;
    transition: background 0.2s;
    position: relative;
}

.cc-switch__track::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.2s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.cc-switch input:checked + .cc-switch__track {
    background: var(--cc-primary);
}

.cc-switch input:checked + .cc-switch__track::after {
    transform: translateX(20px);
}

.cc-cat__cookies {
    margin: 0.75rem 0 0;
    padding: 0;
    list-style: none;
    font-size: 0.78rem;
    color: var(--cc-text-muted);
}

.cc-cat__cookies li {
    padding: 0.2rem 0;
    border-top: 1px dashed var(--cc-border);
}

.cc-cat__cookies li:first-child {
    border-top: 0;
}

.cc-modal__foot {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: flex-end;
    padding: 1rem 1.5rem 1.25rem;
    border-top: 1px solid var(--cc-border);
}

.cc-footer-link {
    font-size: 0.85rem;
    color: var(--cc-text-muted);
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    text-decoration: underline;
}

.cc-footer-link--icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    font-size: 1rem;
    transition: background 0.15s, color 0.15s, transform 0.15s;
}

.cc-footer-link--icon:hover {
    background: var(--am-accent, #e85d3a);
    color: #fff;
    transform: translateY(-1px);
}

.cc-footer-link:hover {
    color: var(--cc-primary);
}

/* User account — cookie selection overview */
.am-cc-selection {
    background: var(--am-surface, #fff);
    border: 1px solid var(--am-border, #e2e8ec);
    border-radius: 14px;
    padding: 1.5rem;
    box-shadow: 0 4px 24px rgba(12, 74, 92, 0.06);
}

.am-cc-selection__head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.25rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--am-border, #e2e8ec);
}

.am-cc-selection__meta {
    font-size: 0.88rem;
    color: var(--am-text-muted, #5c6f7a);
    margin: 0.35rem 0 0;
}

.am-cc-selection__hint {
    font-size: 0.82rem;
    color: var(--am-text-muted, #5c6f7a);
    margin: 0.35rem 0 0;
}

.am-cc-selection__edit {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    white-space: nowrap;
}

.am-cc-selection__list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.am-cc-selection__item {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 1rem;
    align-items: start;
    padding: 1rem 1.1rem;
    border: 1px solid var(--am-border, #e2e8ec);
    border-radius: 12px;
    background: var(--am-surface-alt, #f8fafb);
}

.am-cc-selection__icon {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 10px;
    background: color-mix(in srgb, var(--cc-primary, #0c4a5c) 12%, transparent);
    color: var(--cc-primary, #0c4a5c);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.am-cc-selection__name {
    margin: 0 0 0.2rem;
    font-size: 0.95rem;
    font-weight: 700;
}

.am-cc-selection__desc {
    margin: 0;
    font-size: 0.85rem;
    color: var(--am-text-muted, #5c6f7a);
}

.am-cc-selection__cookies {
    margin: 0.5rem 0 0;
    padding: 0;
    list-style: none;
    font-size: 0.78rem;
    color: var(--am-text-muted, #5c6f7a);
}

.am-cc-selection__cookies li {
    padding: 0.15rem 0;
}

.am-cc-selection__badge {
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.25rem 0.65rem;
    border-radius: 999px;
    white-space: nowrap;
}

.am-cc-selection__badge.is-on {
    background: #dcfce7;
    color: #166534;
}

.am-cc-selection__badge.is-off {
    background: #f1f5f9;
    color: #64748b;
}

@media (max-width: 768px) {
    .am-cc-selection__item {
        grid-template-columns: auto 1fr;
    }
    .am-cc-selection__badge {
        grid-column: 2;
        justify-self: start;
    }
    .cc-banner {
        grid-template-columns: 1fr;
    }
    .cc-banner__actions {
        flex-direction: column;
        min-width: 0;
    }
    .cc-modal__foot {
        flex-direction: column;
    }
    .cc-btn {
        width: 100%;
    }
}
