:root {
    --cookie-bg: #0f172a;
    --cookie-border: rgba(255, 255, 255, 0.15);
    --cookie-text: #f8fbff;
    --cookie-accent: #667eea;
    --cookie-accent-dark: #4c51bf;
    --cookie-muted: #94a3b8;
}

.cookie-consent {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: min(520px, calc(100% - 32px));
    background: var(--cookie-bg);
    color: var(--cookie-text);
    border: 1px solid var(--cookie-border);
    border-radius: 18px;
    padding: 20px 24px;
    box-shadow: 0 25px 85px rgba(15, 23, 42, 0.45);
    z-index: 9999;
    font-family: 'Poppins', 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.cookie-consent__inner {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.cookie-consent__title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 6px;
}

.cookie-consent__description {
    font-size: 0.95rem;
    color: var(--cookie-muted);
    margin: 0;
}

.cookie-consent__actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.cookie-consent__links {
    font-size: 0.9rem;
    margin: 0;
    color: var(--cookie-muted);
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.cookie-link {
    background: none;
    border: none;
    color: #cbd5f5;
    text-decoration: underline;
    cursor: pointer;
    font-size: 0.9rem;
    padding: 0;
}

.cookie-link:hover,
.cookie-link:focus-visible {
    color: #ffffff;
}

.cookie-btn {
    border: none;
    border-radius: 999px;
    font-weight: 600;
    padding: 10px 18px;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.cookie-btn.primary {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
    box-shadow: 0 12px 25px rgba(102, 126, 234, 0.35);
}

.cookie-btn.primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 18px 30px rgba(102, 126, 234, 0.4);
}

.cookie-btn.outline {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.4);
    color: #fff;
}

.cookie-btn.outline:hover {
    border-color: #fff;
}

.cookie-btn.ghost {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.cookie-btn.ghost:hover {
    background: rgba(255, 255, 255, 0.15);
}

.cookie-footer-link {
    background: none;
    border: none;
    color: #667eea;
    font-weight: 600;
    cursor: pointer;
    padding: 6px 10px;
    border-radius: 999px;
    transition: background 0.2s ease;
}

.cookie-footer-link:hover,
.cookie-footer-link:focus-visible {
    background: rgba(102, 126, 234, 0.1);
}

.cookie-modal {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    z-index: 10000;
    font-family: 'Poppins', 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.cookie-modal[hidden] {
    display: none !important;
}

.cookie-modal__overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(4px);
}

.cookie-modal__panel {
    position: relative;
    width: min(760px, 100%);
    max-height: calc(100vh - 80px);
    overflow: hidden;
    background: #fff;
    border-radius: 24px;
    box-shadow: 0 35px 80px rgba(15, 23, 42, 0.35);
    display: flex;
    flex-direction: column;
    z-index: 1;
}

.cookie-modal__header {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 28px 32px 16px;
}

.cookie-modal__title {
    font-size: 1.4rem;
    font-weight: 600;
    margin: 0 0 6px;
    color: #0f172a;
}

.cookie-modal__subtitle {
    margin: 0;
    color: #475569;
    font-size: 0.95rem;
}

.cookie-modal__close {
    border: none;
    background: rgba(15, 23, 42, 0.08);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 1.4rem;
    cursor: pointer;
    line-height: 1;
}

.cookie-modal__quick-actions {
    display: flex;
    gap: 12px;
    padding: 0 32px 12px;
    flex-wrap: wrap;
}

.cookie-modal__body {
    padding: 0 32px 16px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.cookie-option {
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 18px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.cookie-option__title {
    font-size: 1.05rem;
    font-weight: 600;
    margin: 0 0 4px;
    color: #0f172a;
}

.cookie-option__description {
    margin: 0;
    color: #475569;
    font-size: 0.92rem;
}

.cookie-switch {
    position: relative;
    display: inline-flex;
    align-items: center;
}

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

.cookie-switch span {
    width: 46px;
    height: 26px;
    background: #cbd5f5;
    border-radius: 999px;
    position: relative;
    transition: background 0.2s ease;
}

.cookie-switch span::after {
    content: "";
    position: absolute;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #fff;
    top: 2px;
    left: 2px;
    transition: transform 0.2s ease;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.25);
}

.cookie-switch input:checked + span {
    background: linear-gradient(120deg, #22c55e, #16a34a);
}

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

.cookie-switch input:disabled + span {
    background: #cbd5f5;
    opacity: 0.6;
}

.cookie-modal__footer {
    padding: 16px 32px 28px;
    border-top: 1px solid #f1f5f9;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.cookie-modal__legal {
    margin: 0;
    font-size: 0.9rem;
    color: #475569;
}

.cookie-modal__buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

body.cookie-modal-open {
    overflow: hidden;
}

.sr-only {
    position: absolute !important;
    height: 1px;
    width: 1px;
    clip: rect(1px, 1px, 1px, 1px);
    overflow: hidden;
    white-space: nowrap;
}

@media (max-width: 600px) {
    .cookie-consent {
        bottom: 16px;
        right: 16px;
        padding: 18px;
    }

    .cookie-consent__actions {
        flex-direction: column;
    }

    .cookie-modal {
        padding: 16px;
    }

    .cookie-modal__panel {
        border-radius: 16px;
    }

    .cookie-option {
        flex-direction: column;
        align-items: flex-start;
    }

    .cookie-modal__buttons {
        flex-direction: column-reverse;
        align-items: stretch;
    }
}