:root {
    --asc-cookie-accent: #005b4f;
    --asc-cookie-accent-hover: #00463d;
    --asc-cookie-text: #17211f;
    --asc-cookie-muted: #53605d;
    --asc-cookie-border: #d9e0de;
    --asc-cookie-surface: #ffffff;
    --asc-cookie-shadow: 0 16px 45px rgba(0, 0, 0, 0.24);
}

.asc-cookie-hidden { display: none !important; }

.asc-cookie-banner,
.asc-cookie-modal,
.asc-cookie-manage,
.asc-cookie-toast {
    box-sizing: border-box;
    color: var(--asc-cookie-text);
    font-family: Arial, Helvetica, sans-serif;
    line-height: 1.45;
}

.asc-cookie-banner {
    position: fixed;
    z-index: 2147483646;
    right: max(16px, env(safe-area-inset-right));
    bottom: max(16px, env(safe-area-inset-bottom));
    left: max(16px, env(safe-area-inset-left));
    display: flex;
    align-items: center;
    gap: 24px;
    width: min(980px, calc(100% - 32px));
    max-height: calc(100vh - 32px);
    margin: 0 auto;
    padding: 20px;
    overflow: auto;
    border: 1px solid var(--asc-cookie-border);
    border-radius: 14px;
    background: var(--asc-cookie-surface);
    box-shadow: var(--asc-cookie-shadow);
}

.asc-cookie-copy { flex: 1 1 420px; min-width: 0; }
.asc-cookie-title { margin: 0 0 6px; font-size: 20px; font-weight: 700; }
.asc-cookie-text { margin: 0; color: var(--asc-cookie-muted); font-size: 14px; }
.asc-cookie-link { color: var(--asc-cookie-accent); font-weight: 700; text-underline-offset: 2px; }
.asc-cookie-policy-link { margin-top: 16px; }

.asc-cookie-actions,
.asc-cookie-modal-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
}

.asc-cookie-button,
.asc-cookie-manage,
.asc-cookie-close {
    appearance: none;
    border: 1px solid transparent;
    border-radius: 8px;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.asc-cookie-button { min-height: 42px; padding: 9px 15px; font-size: 14px; }
.asc-cookie-button--primary { border-color: var(--asc-cookie-accent); color: #fff; background: var(--asc-cookie-accent); }
.asc-cookie-button--primary:hover,
.asc-cookie-button--primary:focus-visible { background: var(--asc-cookie-accent-hover); }
.asc-cookie-button--secondary { border-color: #81908c; color: var(--asc-cookie-text); background: #fff; }
.asc-cookie-button--secondary:hover,
.asc-cookie-button--secondary:focus-visible { background: #f1f5f4; }

.asc-cookie-button:focus-visible,
.asc-cookie-manage:focus-visible,
.asc-cookie-close:focus-visible,
.asc-cookie-switch input:focus-visible + .asc-cookie-slider {
    outline: 3px solid rgba(0, 91, 79, 0.3);
    outline-offset: 2px;
}

.asc-cookie-backdrop {
    position: fixed;
    z-index: 2147483646;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 16px;
    background: rgba(10, 16, 15, 0.62);
}

.asc-cookie-modal {
    position: relative;
    width: min(640px, 100%);
    max-height: calc(100vh - 32px);
    padding: 24px;
    overflow: auto;
    border-radius: 14px;
    background: var(--asc-cookie-surface);
    box-shadow: var(--asc-cookie-shadow);
}

.asc-cookie-close {
    position: absolute;
    top: 12px;
    right: 12px;
    display: grid;
    width: 40px;
    height: 40px;
    place-items: center;
    color: #37423f;
    background: transparent;
    font-size: 25px;
    line-height: 1;
}
.asc-cookie-close:hover,
.asc-cookie-close:focus-visible { background: #edf2f1; }
.asc-cookie-modal-heading { margin: 0 44px 8px 0; font-size: 24px; }

.asc-cookie-category {
    display: flex;
    align-items: flex-start;
    gap: 18px;
    margin-top: 16px;
    padding: 16px;
    border: 1px solid var(--asc-cookie-border);
    border-radius: 10px;
}
.asc-cookie-category-copy { flex: 1; }
.asc-cookie-category-title { display: block; margin-bottom: 4px; font-size: 16px; }
.asc-cookie-category-description { margin: 0; color: var(--asc-cookie-muted); font-size: 14px; }

.asc-cookie-switch { position: relative; display: inline-block; flex: 0 0 auto; width: 48px; height: 28px; }
.asc-cookie-switch input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.asc-cookie-slider { position: absolute; inset: 0; border-radius: 999px; background: #8b9693; transition: background 0.18s ease; }
.asc-cookie-slider::before {
    position: absolute;
    top: 4px;
    left: 4px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
    content: "";
    transition: transform 0.18s ease;
}
.asc-cookie-switch input:checked + .asc-cookie-slider { background: var(--asc-cookie-accent); }
.asc-cookie-switch input:checked + .asc-cookie-slider::before { transform: translateX(20px); }
.asc-cookie-switch input:disabled + .asc-cookie-slider { opacity: 0.72; cursor: not-allowed; }
.asc-cookie-modal-actions { margin-top: 20px; }

.asc-cookie-manage {
    position: fixed;
    z-index: 2147483645;
    left: max(12px, env(safe-area-inset-left));
    bottom: max(12px, env(safe-area-inset-bottom));
    min-height: 38px;
    padding: 8px 12px;
    border-color: rgba(255, 255, 255, 0.75);
    color: #fff;
    background: rgba(21, 31, 29, 0.88);
    box-shadow: 0 5px 18px rgba(0, 0, 0, 0.28);
    font-size: 13px;
}
.asc-cookie-manage:hover,
.asc-cookie-manage:focus-visible { background: #111a18; }

.asc-cookie-toast {
    position: fixed;
    z-index: 2147483647;
    top: max(16px, env(safe-area-inset-top));
    left: 50%;
    padding: 10px 14px;
    transform: translateX(-50%);
    border-radius: 8px;
    color: #fff;
    background: #17211f;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
    font-size: 14px;
}

@media (max-width: 760px) {
    .asc-cookie-banner { display: block; padding: 16px; }
    .asc-cookie-actions,
    .asc-cookie-modal-actions { display: grid; grid-template-columns: 1fr; margin-top: 16px; }
    .asc-cookie-button { width: 100%; }
    .asc-cookie-modal { padding: 20px 16px; }
    .asc-cookie-category { padding: 14px; }
}

@media (prefers-reduced-motion: reduce) {
    .asc-cookie-slider,
    .asc-cookie-slider::before { transition: none; }
}
