/* Modern WhatsApp-Style Payment Modal - Ultra Compact */

/* Modal Backdrop */
#paymentRegistrationModal .modal-dialog {
    max-width: 95%;
    margin: 0.5rem auto;
}

@media (min-width: 768px) {
    #paymentRegistrationModal .modal-dialog {
        max-width: 1200px;
        margin: 1rem auto;
    }
}

/* Modal Content - Clean White */
#paymentRegistrationModal .modal-content {
    border: none;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    background: #ffffff;
}

/* Modal Header - Minimal & Clean */
#paymentRegistrationModal .modal-header {
    background: linear-gradient(135deg, #128C7E 0%, #075E54 100%);
    border-radius: 8px 8px 0 0;
    padding: 0.6rem 1rem;
    border-bottom: none;
}

#paymentRegistrationModal .modal-title {
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.3px;
}

#paymentRegistrationModal .close {
    opacity: 0.9;
    text-shadow: none;
    font-size: 1.5rem;
    font-weight: 300;
    padding: 0;
    margin: 0;
}

#paymentRegistrationModal .close:hover {
    opacity: 1;
}

/* Modal Body - Clean White - Reduced Padding */
#paymentRegistrationModal .modal-body {
    padding: 0.75rem 1rem;
    background: #ffffff;
}

/* Customer Info Card - Modern - Compact */
#paymentCustomerInfo {
    background: #F0F2F5;
    border: none;
    border-radius: 6px;
    padding: 0.6rem 0.75rem;
    margin-bottom: 0.75rem;
}

#paymentCustomerInfo strong {
    font-size: 0.75rem;
    color: #667781;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

#paymentCustomerInfo .text-primary {
    color: #128C7E !important;
    font-size: 1rem;
}

#paymentCustomerInfo .text-danger {
    color: #DC3545 !important;
    font-weight: 600;
}

#paymentCustomerInfo h5 {
    font-size: 1.1rem;
    margin: 0;
}

/* Form Controls - Clean - Compact */
#paymentRegistrationModal .form-control {
    border: 2px solid #4A90E2 !important;
    border-radius: 6px;
    padding: 0.4rem 0.6rem;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    background: #ffffff;
    height: auto;
}

#paymentRegistrationModal .form-control:focus {
    border-color: #128C7E !important;
    box-shadow: 0 0 0 3px rgba(18, 140, 126, 0.15) !important;
    background: #ffffff;
}

#paymentRegistrationModal select.form-control {
    cursor: pointer;
}

#paymentRegistrationModal label {
    font-size: 0.8rem;
    font-weight: 500;
    color: #3B4A54;
    margin-bottom: 0.25rem;
}

#paymentRegistrationModal label .text-danger {
    color: #DC3545;
}

/* Row Spacing - Reduced */
#paymentRegistrationModal .row.mb-2 {
    margin-bottom: 0.5rem !important;
}

#paymentRegistrationModal .row.mt-2 {
    margin-top: 0.5rem !important;
}

#paymentRegistrationModal .row.mt-3 {
    margin-top: 0.75rem !important;
}

#paymentRegistrationModal .mb-1 {
    margin-bottom: 0.25rem !important;
}

/* Buttons - Modern & Clean - Compact */
#paymentRegistrationModal .btn {
    border-radius: 6px;
    padding: 0.4rem 1rem;
    font-weight: 500;
    font-size: 0.85rem;
    border: none;
    transition: all 0.2s ease;
}

#btnLoadOutstanding {
    background: #128C7E;
    color: white;
    box-shadow: 0 2px 8px rgba(18, 140, 126, 0.2);
}

#btnLoadOutstanding:hover {
    background: #0F7A6E;
    box-shadow: 0 4px 12px rgba(18, 140, 126, 0.3);
    transform: translateY(-1px);
}

#btnSavePayment {
    background: #25D366;
    color: white;
    box-shadow: 0 2px 8px rgba(37, 211, 102, 0.2);
}

#btnSavePayment:hover {
    background: #20BD5A;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
    transform: translateY(-1px);
}

#btnSavePayment:disabled {
    background: #D1D7DB;
    color: #8696A0;
    cursor: not-allowed;
    box-shadow: none;
}

#paymentRegistrationModal .btn-secondary {
    background: #E9EDEF;
    color: #3B4A54;
}

#paymentRegistrationModal .btn-secondary:hover {
    background: #D1D7DB;
}

/* Table - Clean & Modern - Compact */
#paymentRegistrationModal .table {
    font-size: 0.85rem;
    margin-bottom: 0;
}

#paymentRegistrationModal .table thead th {
    background: #F0F2F5;
    border: none;
    color: #3B4A54;
    font-weight: 600;
    font-size: 0.75rem;
    padding: 0.5rem 0.4rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    position: sticky;
    top: 0;
    z-index: 10;
    line-height: 1.2;
}

#paymentRegistrationModal .table tbody td {
    padding: 0.5rem 0.4rem;
    vertical-align: middle;
    border-bottom: 1px solid #F0F2F5;
    color: #3B4A54;
    line-height: 1.3;
}

#paymentRegistrationModal .table tbody tr {
    background: white;
    transition: background 0.2s ease;
}

#paymentRegistrationModal .table tbody tr:hover {
    background: #F7F8FA;
}

#paymentRegistrationModal .table-responsive {
    border-radius: 6px;
    border: 1px solid #E9EDEF;
    background: white;
    max-height: 300px;
}

/* Checkboxes - Modern - Compact */
#paymentRegistrationModal input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: #128C7E;
}

/* Input in Table - Compact */
#paymentRegistrationModal .payment-amount-input,
#paymentRegistrationModal .payment-mode-select {
    font-size: 0.8rem;
    padding: 0.3rem 0.4rem;
    border: 1px solid #E9EDEF;
    border-radius: 4px;
    height: auto;
}

#paymentRegistrationModal .payment-amount-input:focus,
#paymentRegistrationModal .payment-mode-select:focus {
    border-color: #128C7E;
    box-shadow: 0 0 0 2px rgba(18, 140, 126, 0.1);
}

/* Payment Summary Card - Compact */
#paymentRegistrationModal .card.bg-light {
    background: #F7F8FA !important;
    border: 1px solid #E9EDEF;
    border-radius: 6px;
    margin-top: 0.5rem;
}

#paymentRegistrationModal .card.bg-light .card-body {
    padding: 0.6rem 0.75rem;
}

#paymentRegistrationModal .card.bg-light label {
    font-size: 0.7rem;
    color: #667781;
    margin-bottom: 0.15rem;
}

#paymentRegistrationModal .card.bg-light h5 {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
}

#paymentRegistrationModal .text-primary {
    color: #128C7E !important;
}

#paymentRegistrationModal .text-success {
    color: #25D366 !important;
}

#paymentRegistrationModal .text-danger {
    color: #DC3545 !important;
}

#paymentRegistrationModal .text-warning {
    color: #FFA500 !important;
}

/* Section Headers - Compact */
#outstandingInvoicesSection h6 {
    font-size: 0.9rem;
    font-weight: 600;
    color: #3B4A54;
    margin-bottom: 0.5rem;
    margin-top: 0.75rem;
    padding-bottom: 0.3rem;
    border-bottom: 2px solid #E9EDEF;
}

/* Modal Footer - Compact */
#paymentRegistrationModal .modal-footer {
    background: #F7F8FA;
    border-top: 1px solid #E9EDEF;
    border-radius: 0 0 8px 8px;
    padding: 0.6rem 1rem;
}

/* Icons - Smaller */
#paymentRegistrationModal i {
    margin-right: 0.3rem;
    font-size: 0.9em;
}

/* Empty State - Compact */
#paymentRegistrationModal .text-center.text-muted {
    padding: 1.5rem;
    color: #8696A0 !important;
}

#paymentRegistrationModal .fa-info-circle,
#paymentRegistrationModal .fa-check-circle {
    font-size: 1.5rem;
    margin-bottom: 0.3rem;
    opacity: 0.7;
}

/* Loading State */
#paymentRegistrationModal .fa-spinner {
    font-size: 1.2rem;
    color: #128C7E;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    #paymentRegistrationModal .modal-body {
        padding: 0.5rem 0.75rem;
    }
    
    #paymentRegistrationModal .table {
        font-size: 0.75rem;
    }
    
    #paymentRegistrationModal .table thead th,
    #paymentRegistrationModal .table tbody td {
        padding: 0.4rem 0.25rem;
    }
    
    #paymentRegistrationModal .btn {
        font-size: 0.8rem;
        padding: 0.35rem 0.8rem;
    }
}

/* Smooth Animations */
#paymentRegistrationModal .modal.fade .modal-dialog {
    transition: transform 0.3s ease-out;
}

#paymentRegistrationModal .alert {
    border-radius: 6px;
    border: none;
    padding: 0.6rem 0.75rem;
}

#paymentRegistrationModal .alert-info {
    background: #E7F6F2;
    color: #0F7A6E;
}

/* Scrollbar Styling */
#paymentRegistrationModal .table-responsive::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

#paymentRegistrationModal .table-responsive::-webkit-scrollbar-track {
    background: #F0F2F5;
    border-radius: 3px;
}

#paymentRegistrationModal .table-responsive::-webkit-scrollbar-thumb {
    background: #C4CDD5;
    border-radius: 3px;
}

#paymentRegistrationModal .table-responsive::-webkit-scrollbar-thumb:hover {
    background: #8696A0;
}

/* Column specific widths for compactness */
#paymentRegistrationModal .col-3,
#paymentRegistrationModal .col-md-3 {
    padding-left: 0.4rem;
    padding-right: 0.4rem;
}

#paymentRegistrationModal .col-9,
#paymentRegistrationModal .col-md-9 {
    padding-left: 0.4rem;
    padding-right: 0.4rem;
}
