/* Background */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* ប្រអប់ Checkout */
.modal-content {
    background-color: #ffffff;
    padding: 35px 30px;
    border-radius: 16px;
    width: 90%;
    max-width: 450px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
    animation: slideUp 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    will-change: opacity, transform;
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    cursor: pointer;
    color: #95a5a6;
    transition: all 0.3s ease;
    line-height: 1;
}

.close-modal:hover {
    color: #e74c3c;
    transform: rotate(90deg);
}

.modal-content h2 {
    text-align: center;
    margin-bottom: 25px;
    color: #2c3e50;
    font-weight: 800;
    font-size: 24px;
}

.payment-info {
    text-align: center;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 2px dashed #ecf0f1;
}

/* Custom Select & Bank Options (ផ្នែកថ្មី) */
.custom-select-box {
    border: 1px solid #ddd;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    position: relative;
    background: #fff;
    width: 160px;
    text-align: left;
    user-select: none;
}

.bank-options {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 0 0 4px 4px;
    z-index: 10;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.bank-options div {
    padding: 8px 12px;
    display: flex;
    align-items: center;
}

.bank-options div:hover {
    background: #f1f1f1;
}

.bank-icon {
    width: 45px;
    height: 45px;
    object-fit: contain;
    vertical-align: middle;
    margin-right: 8px;
}

.qr-img {
    width: 160px;
    height: 210px;
    margin-top: 15px;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.qr-img:hover {
    transform: scale(1.05);
}

.input-group {
    margin-bottom: 18px;
    display: flex;
    flex-direction: column;
}

.input-group label {
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 14px;
    color: #34495e;
}

.input-group input,
.input-group textarea {
    padding: 12px 15px;
    border: 2px solid #ecf0f1;
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.3s ease;
    background-color: #fcfcfc;
}

.input-group input:focus,
.input-group textarea:focus {
    outline: none;
    border-color: #3b665b;
    background-color: #ffffff;
    box-shadow: 0 0 0 3px rgba(59, 102, 91, 0.1);
}

.input-group textarea {
    resize: vertical;
    height: 80px;
}

.submit-btn {
    width: 100%;
    font-size: 18px;
    padding: 14px;
    margin-top: 15px;
    background: linear-gradient(135deg, #2ecc71, #27ae60);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(46, 204, 113, 0.3);
    transition: all 0.3s ease;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(46, 204, 113, 0.4);
}

/* សម្រាប់អេក្រង់ទូរស័ព្ទ */
@media (max-width: 768px) {
    .modal-content {
        width: 100%;
        max-width: 100%;
        height: 100vh;
        max-height: 100vh;
        border-radius: 0;
        padding: 30px 20px;
    }

    .modal-overlay {
        align-items: flex-end;
    }
}