.cookie-consent-root {
    --cc-accent: var(--accent, var(--shop-accent, #1d4ed8));
    --cc-accent-hover: var(--accent-hover, var(--shop-accent-dark, #1e40af));
    --cc-surface: #ffffff;
    --cc-text: #0f172a;
    --cc-muted: #64748b;
    --cc-border: #e2e8f0;
    --cc-shadow: 0 18px 48px rgba(15, 23, 42, 0.18);
    font-family: Inter, system-ui, -apple-system, sans-serif;
}

.cookie-consent-banner {
    position: fixed;
    left: 16px;
    right: 16px;
    bottom: 16px;
    z-index: 1080;
    max-width: 960px;
    margin: 0 auto;
}

.cookie-consent-banner-inner {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    gap: 16px 24px;
    align-items: center;
    justify-content: space-between;
    padding: 20px 48px 20px 22px;
    background: var(--cc-surface);
    border: 1px solid var(--cc-border);
    border-radius: 16px;
    box-shadow: var(--cc-shadow);
}

.cookie-consent-banner-close {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 8px;
    background: #f8fafc;
    color: var(--cc-muted);
    cursor: pointer;
    font-size: 1.25rem;
    line-height: 1;
}

.cookie-consent-banner-close:hover {
    background: #f1f5f9;
    color: var(--cc-text);
}

.cookie-consent-copy {
    flex: 1 1 280px;
    min-width: 0;
}

.cookie-consent-title {
    margin: 0 0 8px;
    padding-right: 8px;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--cc-text);
}

.cookie-consent-message {
    margin: 0 0 8px;
    font-size: 0.92rem;
    line-height: 1.55;
    color: var(--cc-muted);
}

.cookie-consent-policy {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--cc-accent);
    text-decoration: none;
}

.cookie-consent-policy:hover {
    color: var(--cc-accent-hover);
    text-decoration: underline;
}

.cookie-consent-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.cookie-consent-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0 16px;
    border-radius: 10px;
    border: 1px solid transparent;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

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

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

.cookie-consent-btn-secondary {
    background: #f8fafc;
    color: var(--cc-text);
    border-color: var(--cc-border);
}

.cookie-consent-btn-secondary:hover {
    background: #f1f5f9;
}

.cookie-consent-btn-ghost {
    background: transparent;
    color: var(--cc-muted);
}

.cookie-consent-btn-ghost:hover {
    color: var(--cc-text);
    background: #f8fafc;
}

.cookie-consent-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1081;
    background: rgba(15, 23, 42, 0.45);
}

.cookie-consent-modal {
    position: fixed;
    inset: 0;
    z-index: 1082;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.cookie-consent-modal-card {
    width: min(560px, 100%);
    max-height: min(80vh, 640px);
    overflow: auto;
    background: var(--cc-surface);
    border-radius: 16px;
    box-shadow: var(--cc-shadow);
}

.cookie-consent-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 18px 20px;
    border-bottom: 1px solid var(--cc-border);
}

.cookie-consent-modal-title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--cc-text);
}

.cookie-consent-modal-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 8px;
    background: #f8fafc;
    color: var(--cc-muted);
    cursor: pointer;
}

.cookie-consent-modal-close:hover {
    background: #f1f5f9;
    color: var(--cc-text);
}

.cookie-consent-modal-body {
    padding: 16px 20px;
    display: grid;
    gap: 12px;
}

.cookie-consent-category {
    padding: 14px 16px;
    border: 1px solid var(--cc-border);
    border-radius: 12px;
}

.cookie-consent-category-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 6px;
}

.cookie-consent-category-label {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--cc-text);
}

.cookie-consent-category-desc {
    margin: 0;
    font-size: 0.85rem;
    line-height: 1.5;
    color: var(--cc-muted);
}

.cookie-consent-switch {
    position: relative;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}

.cookie-consent-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.cookie-consent-switch-slider {
    position: absolute;
    inset: 0;
    background: #cbd5e1;
    border-radius: 999px;
    transition: background 0.15s ease;
    cursor: pointer;
}

.cookie-consent-switch-slider::before {
    content: '';
    position: absolute;
    left: 3px;
    top: 3px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fff;
    transition: transform 0.15s ease;
}

.cookie-consent-switch input:checked + .cookie-consent-switch-slider {
    background: var(--cc-accent);
}

.cookie-consent-switch input:checked + .cookie-consent-switch-slider::before {
    transform: translateX(20px);
}

.cookie-consent-switch input:disabled + .cookie-consent-switch-slider {
    opacity: 0.65;
    cursor: not-allowed;
}

.cookie-consent-modal-footer {
    padding: 16px 20px 20px;
    border-top: 1px solid var(--cc-border);
    display: flex;
    justify-content: flex-end;
}

.cookie-consent-fab {
    position: fixed;
    left: 16px;
    bottom: 16px;
    z-index: 1079;
    width: 44px;
    height: 44px;
    border: 1px solid var(--cc-border);
    border-radius: 50%;
    background: var(--cc-surface);
    color: var(--cc-muted);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
    cursor: pointer;
}

.cookie-consent-fab:hover {
    color: var(--cc-accent);
}

.cookie-consent-btn.is-busy {
    opacity: 0.72;
    pointer-events: none;
}

.cookie-consent-toast {
    position: fixed;
    left: 50%;
    bottom: 24px;
    z-index: 1090;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    max-width: min(420px, calc(100vw - 32px));
    padding: 14px 18px;
    border-radius: 12px;
    background: #0f172a;
    color: #fff;
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.28);
    transform: translate(-50%, 16px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.22s ease, transform 0.22s ease;
}

.cookie-consent-toast.is-visible {
    opacity: 1;
    transform: translate(-50%, 0);
    pointer-events: auto;
}

.cookie-consent-toast-icon {
    color: #4ade80;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.cookie-consent-toast-message {
    font-size: 0.9rem;
    line-height: 1.45;
}

@media (max-width: 640px) {
    .cookie-consent-banner {
        left: 12px;
        right: 12px;
        bottom: 12px;
    }

    .cookie-consent-actions {
        width: 100%;
    }

    .cookie-consent-actions .cookie-consent-btn {
        flex: 1 1 auto;
    }
}
