/* Payment Form Styles */

.body_div {
    border: 1px solid red;
    position: fixed;
    top: 0;
    left: 0;
    height: 100%;
    z-index: 999;
    width: 100%;
    user-select: none !important;
}

.modal {
    display: none;
    position: fixed;
    z-index: 9999999;
    padding-top: 100px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.4);
}

.modal-content {
    background-color: #fefefe;
    margin: auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-width: 600px;
}

.close {
    color: #aaaaaa;
    display: flex;
    margin-left: auto;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover,
.close:focus {
    color: #000;
    text-decoration: none;
}

/* Required field asterisk */
.required {
    color: #dc3545 !important;
    font-weight: bold;
}

/* Payment Method Selection */
.payment-method-selection {
    margin: 20px 0;
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #f9f9f9;
}

.payment-options {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.payment-option {
    flex: 1;
    min-width: 250px;
}

.payment-option input[type="radio"] {
    display: none;
}

.payment-option label {
    display: block;
    padding: 15px;
    border: 2px solid #ddd;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
}

.payment-option input[type="radio"]:checked+label {
    border-color: #007bff;
    background: #e7f3ff;
}

.option-content strong {
    display: block;
    margin-bottom: 5px;
    color: #333;
}

.option-content p {
    margin: 0;
    color: #666;
    font-size: 14px;
}

/* Payment Sections */
.payment-section {
    margin: 20px 0;
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 8px;
}

.membership-info {
    margin: 20px 0;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 5px;
}

.membership-info h3 {
    margin-top: 0;
    color: #333;
}

.membership-content p {
    margin: 10px 0;
}

/* Razorpay Section */
.razorpay-payment {
    margin-top: 20px;
    text-align: center;
}

#razorpay_btn {
    padding: 12px 30px;
    font-size: 16px;
    font-weight: bold;
}

/* Manual Payment Section */
.payment-container {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.payment-details {
    flex: 1;
    min-width: 300px;
}

.account-details {
    padding: 15px;
    background: #f8f9fa;
    border-radius: 5px;
    margin-top: 15px;
}

.account-details h4 {
    margin-top: 0;
    color: #333;
}

.qr-section {
    flex: 0 0 250px;
    text-align: center;
}

.qr-code {
    margin-bottom: 15px;
}

.qr-code img {
    max-width: 100%;
    height: auto;
    border: 2px solid #ddd;
    border-radius: 8px;
}

.download-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: #007bff;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    transition: background 0.3s;
}

.download-btn:hover {
    background: #0056b3;
    color: white;
    text-decoration: none;
}

/* Responsive */
@media (max-width: 768px) {
    .payment-container {
        flex-direction: column;
    }

    .qr-section {
        flex: 1;
    }

    .modal-content {
        width: 95%;
    }
}

/* Compact clean payment UI for member and donation forms */
.form-container .payment_row {
    margin-top: 14px !important;
}

.form-container .payment-method-selection {
    margin: 12px 0 !important;
    padding: 14px !important;
    border: 1px solid #d9e7f8 !important;
    border-radius: 12px !important;
    background: linear-gradient(180deg, #ffffff 0%, #f6faff 100%) !important;
    box-shadow: 0 10px 28px rgba(15, 65, 130, 0.06) !important;
}

.form-container .payment-method-selection h4 {
    margin: 0 0 10px !important;
    color: #10233f !important;
    font-size: 19px !important;
    font-weight: 800 !important;
    letter-spacing: 0 !important;
}

.form-container .payment-options {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)) !important;
    gap: 10px !important;
}

.form-container .payment-option {
    min-width: 0 !important;
    flex: none !important;
}

.form-container .payment-option label {
    min-height: 70px !important;
    padding: 12px 14px 12px 48px !important;
    border: 1px solid #cfdef1 !important;
    border-radius: 12px !important;
    background: #fff !important;
    position: relative !important;
    box-shadow: 0 8px 18px rgba(16, 46, 90, 0.04) !important;
}

.form-container .payment-option label::before {
    content: "";
    position: absolute;
    left: 16px;
    top: 20px;
    width: 18px;
    height: 18px;
    border: 2px solid #8db6e2;
    border-radius: 50%;
    background: #fff;
}

.form-container .payment-option input[type="radio"]:checked + label {
    border-color: #1477d4 !important;
    background: #eef7ff !important;
    box-shadow: 0 10px 24px rgba(20, 119, 212, 0.13) !important;
}

.form-container .payment-option input[type="radio"]:checked + label::before {
    border-color: #1477d4;
    background: radial-gradient(circle, #1477d4 0 42%, #fff 45% 100%);
}

.form-container .option-content strong {
    margin-bottom: 3px !important;
    color: #12233a !important;
    font-size: 14px !important;
    font-weight: 800 !important;
}

.form-container .option-content p {
    color: #516173 !important;
    font-size: 12.5px !important;
    line-height: 1.35 !important;
}

.form-container .membership-info,
.form-container .donation-info {
    margin: 12px 0 !important;
    padding: 14px 16px !important;
    background: #f7fbff !important;
    border: 1px solid #dceafb !important;
    border-left: 4px solid #1477d4 !important;
    border-radius: 12px !important;
}

.form-container .membership-info h3,
.form-container .donation-info h3 {
    margin: 0 0 8px !important;
    color: #10233f !important;
    font-size: 18px !important;
    font-weight: 800 !important;
}

.form-container .membership-content p,
.form-container .donation-content p {
    margin: 5px 0 !important;
    color: #304258 !important;
    font-size: 14px !important;
}

.form-container .payment-section {
    margin: 12px 0 !important;
    padding: 14px !important;
    border: 1px solid #d9e7f8 !important;
    border-radius: 14px !important;
    background: #fff !important;
    box-shadow: 0 10px 28px rgba(15, 65, 130, 0.06) !important;
}

.form-container .payment-container {
    max-width: 100% !important;
    margin: 0 !important;
    padding: 14px !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) 180px !important;
    align-items: stretch !important;
    gap: 14px !important;
    border: 1px solid #e4edf8 !important;
    border-radius: 14px !important;
    background: linear-gradient(135deg, #f8fbff 0%, #eef5ff 100%) !important;
}

.form-container .payment-details,
.form-container .qr-section {
    min-width: 0 !important;
    padding: 12px !important;
    border-radius: 12px !important;
    background: #fff !important;
    box-shadow: 0 8px 18px rgba(16, 46, 90, 0.05) !important;
}

.form-container .account-details {
    margin: 0 !important;
    padding: 12px 14px !important;
    min-height: 100% !important;
    border: 0 !important;
    border-left: 3px solid #1477d4 !important;
    border-radius: 10px !important;
    background: #f8fbff !important;
}

.form-container .account-details h4 {
    margin: 0 0 8px !important;
    color: #10233f !important;
    font-size: 17px !important;
    font-weight: 800 !important;
}

.form-container .account-details p,
.form-container .account-details div {
    font-size: 13px !important;
    line-height: 1.45 !important;
}

.form-container .qr-section {
    flex: none !important;
    width: auto !important;
    text-align: center !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    gap: 10px !important;
}

.form-container .qr-code {
    margin: 0 !important;
}

.form-container .qr-code img {
    width: 150px !important;
    height: 150px !important;
    max-width: 100% !important;
    object-fit: contain !important;
    border: 1px solid #d8e4f2 !important;
    border-radius: 8px !important;
    background: #fff !important;
    padding: 0 !important;
    display: block !important;
}

.form-container .qr-placeholder {
    width: 150px !important;
    height: 150px !important;
    max-width: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    padding: 14px !important;
    border: 1px dashed #aebdd0 !important;
    border-radius: 8px !important;
    background: repeating-linear-gradient(45deg, #f8fafc, #f8fafc 8px, #eef4fb 8px, #eef4fb 16px) !important;
    color: #53657a !important;
    font-size: 13px !important;
    font-weight: 800 !important;
    line-height: 1.35 !important;
}

.form-container .download-btn {
    width: 100% !important;
    justify-content: center !important;
    padding: 9px 12px !important;
    border-radius: 10px !important;
    background: linear-gradient(135deg, #1477d4 0%, #17268a 100%) !important;
    color: #fff !important;
    font-size: 13px !important;
    font-weight: 800 !important;
    box-shadow: 0 8px 16px rgba(20, 119, 212, 0.18) !important;
}

.form-container .download-btn-disabled {
    background: #e6edf5 !important;
    color: #5b6b7f !important;
    box-shadow: none !important;
    cursor: not-allowed !important;
}

/* Success / status modal */
.modal .modal-content:has(.success-modal-card) {
    width: min(92vw, 560px) !important;
    max-width: 560px !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 18px !important;
    overflow: hidden !important;
    box-shadow: 0 24px 70px rgba(10, 31, 68, 0.28) !important;
    background: #fff !important;
}

.modal .modal-content:has(.fa-check-circle) {
    width: min(92vw, 560px) !important;
    max-width: 560px !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 18px !important;
    overflow: hidden !important;
    box-shadow: 0 24px 70px rgba(10, 31, 68, 0.28) !important;
    background: #fff !important;
}

.modal .modal-content:has(.fa-check-circle) .text-center.p-4 {
    padding: 30px 28px 26px !important;
    background: linear-gradient(180deg, #ffffff 0%, #f5fbff 100%) !important;
    position: relative;
}

.modal .modal-content:has(.fa-check-circle) .text-center.p-4::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 7px;
    background: linear-gradient(90deg, #16a34a, #0b74d1, #17268a);
}

.modal .modal-content:has(.fa-check-circle) .fa-check-circle {
    width: 76px;
    height: 76px;
    margin: 0 auto 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff !important;
    background: linear-gradient(135deg, #22c55e, #1274d4);
    box-shadow: 0 14px 32px rgba(18, 116, 212, 0.26);
    font-size: 34px !important;
}

.modal .modal-content:has(.fa-check-circle) h3 {
    color: #10233f !important;
    font-size: 24px !important;
    font-weight: 900 !important;
}

.modal .modal-content:has(.fa-check-circle) p {
    color: #46586f !important;
    font-size: 15px !important;
    line-height: 1.55 !important;
}

.success-modal-card {
    position: relative;
    padding: 30px 28px 26px;
    text-align: center;
    background: linear-gradient(180deg, #ffffff 0%, #f5fbff 100%);
}

.success-modal-card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 7px;
    background: linear-gradient(90deg, #16a34a, #0b74d1, #17268a);
}

.success-modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #eef4fb;
    color: #53657a;
    font-size: 24px;
    font-weight: 800;
    line-height: 1;
    cursor: pointer;
}

.success-modal-icon {
    width: 76px;
    height: 76px;
    margin: 0 auto 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: linear-gradient(135deg, #22c55e, #1274d4);
    box-shadow: 0 14px 32px rgba(18, 116, 212, 0.26);
    font-size: 34px;
}

.success-modal-card h3 {
    margin: 0 0 8px;
    color: #10233f;
    font-size: 24px;
    font-weight: 900;
    letter-spacing: 0;
}

.success-modal-card p {
    margin: 8px 0;
    color: #46586f;
    font-size: 15px;
    line-height: 1.55;
}

.success-modal-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-bottom: 10px;
    padding: 6px 12px;
    border-radius: 999px;
    color: #0f5132;
    background: #dcfce7;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.success-modal-id {
    margin: 16px auto !important;
    padding: 14px 16px;
    border-radius: 14px;
    background: #eff6ff;
    border: 1px dashed #82b8ef;
    color: #10233f !important;
    font-size: 15px !important;
}

.success-modal-id strong {
    display: block;
    margin-top: 4px;
    color: #0b62bd;
    font-size: 24px;
    letter-spacing: 1px;
}

.success-modal-note {
    padding: 12px 14px;
    border-radius: 12px;
    background: #fff8e7;
    color: #6b4c00 !important;
    border: 1px solid #ffe2a3;
}

.success-modal-actions {
    margin-top: 18px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.success-modal-btn {
    position: static !important;
    float: none !important;
    opacity: 1 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 150px !important;
    height: auto !important;
    border: 0;
    border-radius: 999px;
    padding: 12px 28px;
    background: linear-gradient(135deg, #1477d4, #17268a);
    color: #fff !important;
    font-size: 15px !important;
    font-weight: 900;
    line-height: 1.2 !important;
    text-shadow: none !important;
    box-shadow: 0 10px 22px rgba(20, 119, 212, 0.22);
    cursor: pointer;
}

.success-modal-btn:hover,
.success-modal-btn:focus {
    color: #fff !important;
    transform: translateY(-1px);
    box-shadow: 0 14px 26px rgba(20, 119, 212, 0.28);
}

@media (max-width: 576px) {
    .success-modal-card {
        padding: 26px 18px 22px;
    }

    .success-modal-card h3 {
        font-size: 20px;
    }

    .success-modal-id strong {
        font-size: 21px;
    }
}

.form-container #razorpay_btn {
    width: auto !important;
    min-width: 220px !important;
    padding: 11px 18px !important;
    border-radius: 12px !important;
    font-size: 15px !important;
    font-weight: 800 !important;
    background: linear-gradient(135deg, #16884e 0%, #096b70 100%) !important;
    border: 0 !important;
}

.form-container #manual_section .form-group,
.form-container #manual_section .form-row {
    margin: 12px 0 0 !important;
}

.form-container #manual_section .payment-upload-row > .row {
    display: flex !important;
    align-items: stretch !important;
}

.form-container #manual_section .payment-upload-row [class*="col-"] {
    display: flex !important;
}

.form-container #manual_section .image_comp_row {
    padding: 12px 14px !important;
    border-radius: 12px !important;
    background: #f8fbff !important;
    align-items: center !important;
}

.form-container #manual_section .payment-field-card {
    width: 100% !important;
    min-height: 118px !important;
    display: grid !important;
    grid-template-columns: minmax(150px, 0.55fr) minmax(180px, 1fr) !important;
    gap: 12px !important;
    align-items: center !important;
}

.form-container #manual_section .payment-field-card .form-group-label {
    margin: 0 !important;
    font-size: 14px !important;
    font-weight: 800 !important;
    color: #12233a !important;
}

.form-container #manual_section .payment-mode-card select {
    min-height: 42px !important;
    margin: 0 !important;
}

.form-container #manual_section .payment-receipt-card .form_img {
    display: flex !important;
    justify-content: flex-end !important;
    margin-left: auto !important;
}

.form-container #manual_section .form_img,
.form-container #manual_section .form_img .col-md-3 {
    width: 100% !important;
    max-width: 260px !important;
}

@media (max-width: 768px) {
    .form-container .payment-method-selection,
    .form-container .payment-section {
        padding: 12px !important;
    }

    .form-container .payment-container {
        grid-template-columns: 1fr !important;
        padding: 12px !important;
    }

    .form-container .qr-section {
        width: 100% !important;
    }

    .form-container .qr-code img {
        width: 138px !important;
        height: 138px !important;
    }

    .form-container .qr-placeholder {
        width: 138px !important;
        height: 138px !important;
    }

    .form-container #manual_section .payment-upload-row [class*="col-"] {
        display: block !important;
        margin-bottom: 10px !important;
    }

    .form-container #manual_section .payment-field-card {
        min-height: auto !important;
        display: block !important;
    }

    .form-container #manual_section .form_img,
    .form-container #manual_section .form_img .col-md-3 {
        max-width: 100% !important;
        margin-top: 8px !important;
    }

    .form-container #manual_section .payment-receipt-card .form_img {
        justify-content: flex-start !important;
        margin-left: 0 !important;
    }
}
