.cookie-backdrop {
    position: fixed;
    inset: 0;
    z-index: 199;
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(2px);
}

.cookie-popup {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 50px;
    z-index: 200;
    position: fixed;
    left: 50%;
    bottom: 25px;
    transform: translateX(-50%);
    width: min(100%, 1100px);
    max-width: calc(100% - 25px * 2);
    max-height: calc(100vh - 50px);
    overflow-y: auto;
    padding: 50px;
    border-radius: 5px;
    background-color: var(--surface);
    color: var(--text-color);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.18);
    border: 2px solid rgba(127, 127, 127, 0.3);
}

/* Remove mobile tap highlight and browser default focus ring inside cookie popup */
.cookie-popup,
.cookie-popup * {
    -webkit-tap-highlight-color: transparent;
}

.cookie-popup :focus {
    outline: none;
    box-shadow: none;
}

.cookie-popup-content p {
    margin: 15px 0 15px;
}

.cookie-popup-title {
    display: flex;
    align-items: center;
    gap: 20px;
}

.cookie-popup-title h2 {
    font-size: 1.25rem;
    margin: 0;
}

.cookie-icon {
    width: 30px;
    height: 30px;
    display: inline-block;
    background-color: var(--text-color);
    -webkit-mask-image: url('./assets/cookie.svg');
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-position: center;
    -webkit-mask-size: contain;
    mask-image: url('./assets/cookie.svg');
    mask-repeat: no-repeat;
    mask-position: center;
    mask-size: contain;
    transition: background-color 0.2s ease;
}

.cookie-popup-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 50px;
    flex-wrap: nowrap;
}

.cookie-link {
    color: var(--primary-color);
    cursor: pointer;
}

.cookie-link-button {
    background: transparent;
    border: 0;
    padding: 0;
    font: inherit;
}

.cookie-link:hover {
    text-decoration: underline;
}

.cookie-popup-buttons {
    display: flex;
    gap: 12px;
    flex-shrink: 0;
}

.cookie-popup-buttons .button {
    white-space: nowrap;
}

.cookie-toggle-item {
    cursor: pointer;
    display: flex;
    align-items: center;
    padding: 8px 0;
    margin: 0;
}

.cookie-toggle-item .toggle {
    display: flex;
    justify-content: center;
    align-items: center;
    flex: 1;
    width: 100%;
}

.cookie-selector p {
    margin: 0 0 5px;
}

.cookie-toggle-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0 50px;
    margin-bottom: 12px;
}

/* ============================================================
   MEDIA QUERIES
   ============================================================ */

@media (max-width: 1280px) {}

@media (max-width: 1024px) {
    .cookie-popup-buttons {
        flex-wrap: wrap;
        flex-direction: column;
    }

    .cookie-popup-buttons .button {
        width: 100%;
        flex: none;
    }

    .cookie-popup-buttons .button {
        flex: 1 1 auto;
        text-align: center;
    }

    .cookie-link-button {
        padding: 8px 0;
        text-align: center;
    }
}

@media (max-width: 900px) {
    .cookie-popup {
        left: 0;
        right: 0;
        bottom: 0;
        transform: none;
        width: 100%;
        max-width: 100%;
        max-height: 85vh;
        padding: 20px 16px;
        border-radius: 12px 12px 0 0;
        flex-direction: column;
        justify-content: flex-start;
        align-items: stretch;
        gap: 16px;
        overflow-y: auto;
    }

    .cookie-popup-actions {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .cookie-popup-buttons {
        flex-direction: row;
    }

    .cookie-popup-buttons .button {
        flex: 1;
        text-align: center;
    }

}

@media (max-width: 480px) {}

@media (max-width: 360px) {
    .cookie-popup-buttons {
        flex-direction: column;
    }

    .cookie-popup-buttons .button {
        width: 100%;
        flex: none;
    }
}