/* ===== QR-ПОПАП Б·КАРТЫ ===== */
.qr-popup {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 2000;
}
.qr-popup.active {
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.qr-popup-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.4);
    backdrop-filter: blur(2px);
}

.qr-popup-content {
    position: relative;
    background: #fff;
    border-radius: 20px 20px 0 0;
    width: 100%;
    max-width: 500px;
    max-height: 85vh;
    overflow-y: auto;
    z-index: 1;
    animation: qrSlideUp 0.35s cubic-bezier(0.32, 0.72, 0, 1);
}

@keyframes qrSlideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

.qr-popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px 12px;
    position: sticky;
    top: 0;
    background: #fff;
    z-index: 1;
}
.qr-popup-header h3 {
    font-size: 18px;
    font-weight: 700;
    color: #1a1a1a;
}
.qr-popup-close {
    width: 32px; height: 32px;
    border: none; background: #f5f5f5;
    border-radius: 10px; cursor: pointer;
    font-size: 20px; display: flex;
    align-items: center; justify-content: center;
    color: #999; transition: all 0.15s;
}
.qr-popup-close:hover { background: #eee; color: #666; }

.qr-popup-body {
    padding: 0 24px 30px;
    text-align: center;
    min-height: 200px;
}

/* QR-код */
.qr-code-wrap {
    padding: 20px 0;
}
.qr-code-wrap img {
    border-radius: 16px;
    margin: 0 auto 16px;
    display: block;
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}
.qr-number {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 3px;
    margin-bottom: 6px;
    color: #1a1a1a;
}
.qr-hint {
    font-size: 13px;
    color: #999;
    margin-bottom: 4px;
}

/* Пустое состояние */
.qr-empty {
    padding: 30px 0;
}
.qr-empty h4 {
    font-size: 17px;
    font-weight: 700;
    margin-bottom: 8px;
    color: #1a1a1a;
}
.qr-empty p {
    color: #666;
    margin-bottom: 8px;
    font-size: 14px;
    line-height: 1.5;
}
.qr-info-text {
    font-size: 14px;
    color: #666;
    margin-bottom: 4px;
    line-height: 1.5;
}
.qr-info-note {
    font-size: 11px;
    color: #bbb;
    margin-bottom: 20px;
    line-height: 1.4;
}
.qr-error {
    color: #c62828;
    padding: 40px 0;
}

/* Иконка замка */
.qr-empty-icon-lock {
    width: 80px; height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, #fdf2f5, #ffe0e5);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

/* Как получить */
.qr-howto {
    text-align: left;
    margin: 20px 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.qr-howto-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: 14px;
    color: #555;
    line-height: 1.4;
}
.qr-howto-num {
    width: 28px; height: 28px;
    border-radius: 50%;
    background: #fdf2f5;
    color: var(--red, #dd1847);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 13px;
    flex-shrink: 0;
}

/* Кнопка активации */
.qr-activate-btn {
    width: 100%;
    padding: 14px;
    background: var(--red, #dd1847);
    color: #fff;
    border: none;
    border-radius: 14px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.2s;
    margin-top: 16px;
}
.qr-activate-btn:hover { background: #c1163d; }

/* Загрузчик */
.qr-loader {
    width: 44px; height: 44px;
    margin: 50px auto;
    border: 3px solid #f0f0f0;
    border-top-color: var(--red, #dd1847);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ПК-версия */
@media (min-width: 768px) {
    .qr-popup.active {
        align-items: center;
    }
    .qr-popup-content {
        border-radius: 20px;
        max-width: 420px;
        max-height: 90vh;
        animation: qrFadeIn 0.25s ease;
    }
    @keyframes qrFadeIn {
        from { opacity: 0; transform: scale(0.95); }
        to { opacity: 1; transform: scale(1); }
    }
}