/*
 * Cookie razılıq pəncərəsi (banner + tənzimləmə modalı).
 *
 * Sinif adları `qr-cookie-` ilə başlayır - tema (`style.css`) və Bootstrap
 * sinifləri ilə toqquşmasın deyə öz markup-ı işlədilir, `.modal` təkrar
 * istifadə edilmir.
 */

/* `display: flex` [hidden]-i basdırır - JS gizlədəndə element yenə görünərdi */
.qr-cookie[hidden],
.qr-cookie-modal[hidden] {
    display: none !important;
}

.qr-cookie {
    position: fixed;
    left: 16px;
    right: 16px;
    bottom: 16px;
    z-index: 1080;
    background: var(--qr-white, #fff);
    color: var(--qr-black, #020202);
    border: 1px solid rgba(2, 2, 2, .08);
    border-radius: 16px;
    box-shadow: 0 18px 45px rgba(2, 2, 2, .18);
    padding: 20px 24px;
    opacity: 0;
    transform: translateY(16px);
    transition: opacity .25s ease, transform .25s ease;
}

.qr-cookie.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.qr-cookie__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    max-width: 1320px;
    margin: 0 auto;
    flex-wrap: wrap;
}

.qr-cookie__text {
    flex: 1 1 420px;
    min-width: 260px;
}

.qr-cookie__title {
    font-family: 'Poppins SemiBold', 'Poppins', sans-serif;
    font-size: 16px;
    line-height: 24px;
    margin-bottom: 4px;
}

.qr-cookie__desc {
    font-size: 14px;
    line-height: 22px;
    color: rgba(2, 2, 2, .7);
    margin-bottom: 0;
}

.qr-cookie__desc a,
.qr-cookie-modal__intro a {
    color: var(--qr-blue, #06a4ed);
    text-decoration: underline;
}

.qr-cookie__actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.qr-cookie__btn {
    border: 1px solid transparent;
    border-radius: 10px;
    padding: 11px 22px;
    font-size: 14px;
    line-height: 20px;
    cursor: pointer;
    background: transparent;
    transition: background-color .2s ease, color .2s ease, border-color .2s ease;
    white-space: nowrap;
}

.qr-cookie__btn--primary {
    background: var(--qr-green, #a9f504);
    color: var(--qr-black, #020202);
}

.qr-cookie__btn--primary:hover {
    background: var(--qr-black, #020202);
    color: var(--qr-white, #fff);
}

.qr-cookie__btn--ghost {
    border-color: rgba(2, 2, 2, .15);
    color: var(--qr-black, #020202);
}

.qr-cookie__btn--ghost:hover {
    border-color: var(--qr-black, #020202);
    background: rgba(2, 2, 2, .04);
}

.qr-cookie__btn--link {
    color: rgba(2, 2, 2, .7);
    text-decoration: underline;
    padding-left: 6px;
    padding-right: 6px;
}

.qr-cookie__btn--link:hover {
    color: var(--qr-black, #020202);
}

/* ── Tənzimləmə modalı ──────────────────────────────────────────────── */

.qr-cookie-modal {
    position: fixed;
    inset: 0;
    z-index: 1090;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    opacity: 0;
    transition: opacity .2s ease;
}

.qr-cookie-modal.is-visible {
    opacity: 1;
}

.qr-cookie-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(2, 2, 2, .55);
}

.qr-cookie-modal__dialog {
    position: relative;
    width: 100%;
    max-width: 620px;
    max-height: calc(100vh - 32px);
    display: flex;
    flex-direction: column;
    background: var(--qr-white, #fff);
    border-radius: 18px;
    box-shadow: 0 24px 60px rgba(2, 2, 2, .3);
    overflow: hidden;
}

.qr-cookie-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 20px 24px;
    border-bottom: 1px solid rgba(2, 2, 2, .08);
}

.qr-cookie-modal__title {
    font-family: 'Poppins SemiBold', 'Poppins', sans-serif;
    font-size: 18px;
    line-height: 26px;
    margin-bottom: 0;
}

.qr-cookie-modal__close {
    border: 0;
    background: transparent;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    color: rgba(2, 2, 2, .6);
}

.qr-cookie-modal__close:hover {
    color: var(--qr-black, #020202);
}

.qr-cookie-modal__body {
    padding: 20px 24px;
    overflow-y: auto;
}

.qr-cookie-modal__intro {
    font-size: 14px;
    line-height: 22px;
    color: rgba(2, 2, 2, .7);
    margin-bottom: 16px;
}

.qr-cookie-groups {
    list-style: none;
    margin: 0;
    padding: 0;
}

.qr-cookie-group {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 0;
    border-top: 1px solid rgba(2, 2, 2, .08);
}

.qr-cookie-group:first-child {
    border-top: 0;
}

.qr-cookie-group__title {
    font-family: 'Poppins Medium', 'Poppins', sans-serif;
    font-size: 15px;
    line-height: 22px;
    margin-bottom: 2px;
}

.qr-cookie-group__desc {
    font-size: 13px;
    line-height: 20px;
    color: rgba(2, 2, 2, .65);
    margin-bottom: 0;
}

.qr-cookie-group__always {
    font-size: 13px;
    line-height: 20px;
    color: var(--qr-blue, #06a4ed);
    white-space: nowrap;
    padding-top: 2px;
}

/* Açar/bağla düyməsi */
.qr-cookie-switch {
    position: relative;
    flex: 0 0 auto;
    width: 44px;
    height: 24px;
    margin: 0;
}

.qr-cookie-switch input {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    cursor: pointer;
    z-index: 2;
}

.qr-cookie-switch__slider {
    position: absolute;
    inset: 0;
    border-radius: 999px;
    background: rgba(2, 2, 2, .2);
    transition: background-color .2s ease;
}

.qr-cookie-switch__slider::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--qr-white, #fff);
    transition: transform .2s ease;
}

.qr-cookie-switch input:checked + .qr-cookie-switch__slider {
    background: var(--qr-green, #a9f504);
}

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

.qr-cookie-switch input:focus-visible + .qr-cookie-switch__slider {
    outline: 2px solid var(--qr-blue, #06a4ed);
    outline-offset: 2px;
}

.qr-cookie-modal__footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
    padding: 16px 24px 20px;
    border-top: 1px solid rgba(2, 2, 2, .08);
}

@media (max-width: 767px) {
    .qr-cookie {
        left: 12px;
        right: 12px;
        bottom: 12px;
        padding: 18px;
    }

    .qr-cookie__inner {
        gap: 16px;
    }

    .qr-cookie__actions {
        width: 100%;
    }

    .qr-cookie__actions .qr-cookie__btn {
        flex: 1 1 auto;
        text-align: center;
    }

    .qr-cookie__btn--link {
        order: 3;
        flex-basis: 100%;
    }

    .qr-cookie-modal__footer .qr-cookie__btn {
        flex: 1 1 auto;
    }
}
