/* Стили для модального окна с QR кодом */
.qr-modal {
    display: none;
    position: fixed;
    z-index: 1002;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.8);
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease;
}

.qr-modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border-radius: 20px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 25px 50px rgba(0,0,0,0.3);
    animation: slideUp 0.4s ease;
}

.qr-modal-header {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.qr-modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
}

.qr-close {
    font-size: 2rem;
    font-weight: 300;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qr-close:hover {
    background: rgba(255,255,255,0.2);
    transform: rotate(90deg);
}

.qr-modal-body {
    padding: 2rem;
    text-align: center;
}

.qr-code-container {
    position: relative;
    margin-bottom: 1.5rem;
}

.qr-code {
    width: 100%;
    max-width: 300px;
    height: auto;
    border: 10px solid white;
    border-radius: 15px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    background: white;
}

.qr-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255,255,255,0.95);
    padding: 1rem 2rem;
    border-radius: 10px;
    font-weight: 600;
    color: #64748b;
    display: none;
}

.order-success-info {
    margin-bottom: 2rem;
}

.order-success-info p {
    margin: 0.5rem 0;
    color: #374151;
    font-size: 1.1rem;
}

.order-number {
    font-weight: 600;
    color: #1f2937 !important;
}

.order-total {
    font-weight: 600;
    color: #059669 !important;
    font-size: 1.2rem !important;
}

.qr-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.qr-close-btn, .qr-print-btn {
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.qr-close-btn {
    background: #6b7280;
    color: white;
}

.qr-close-btn:hover {
    background: #4b5563;
    transform: translateY(-2px);
}

.qr-print-btn {
    background: #3b82f6;
    color: white;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.qr-print-btn:hover {
    background: #2563eb;
    transform: translateY(-2px);
}

/* Адаптивность для QR модального окна */
@media (max-width: 768px) {
    .qr-modal-content {
        width: 95%;
        max-width: 400px;
    }
    
    .qr-modal-body {
        padding: 1.5rem;
    }
    
    .qr-code {
        max-width: 250px;
    }
    
    .qr-actions {
        flex-direction: column;
    }
    
    .qr-close-btn, .qr-print-btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .qr-modal-content {
        border-radius: 15px;
    }
    
    .qr-modal-header {
        padding: 1.2rem 1.5rem;
    }
    
    .qr-modal-header h2 {
        font-size: 1.3rem;
    }
    
    .qr-code {
        max-width: 200px;
        border-width: 8px;
    }
}

.qr-code-container {
    position: relative;
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 320px; /* Минимальная высота для контейнера */
}

.qr-code {
    max-width: 300px;
    width: 100%;
    height: auto;
    border: 10px solid white;
    border-radius: 15px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    background: white;
    /* Убедитесь что эти свойства есть */
    display: block;
    margin: 0 auto;
}

.qr-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255,255,255,0.95);
    padding: 1rem 2rem;
    border-radius: 10px;
    font-weight: 600;
    color: #64748b;
    display: none;
    text-align: center;
    z-index: 2;
}