/* Customer Modal Layout - Multi-column layout to avoid scrolling */

/* Make customer modals wider */
#addCustomerModal .modal-dialog,
#editCustomerModal .modal-dialog {
    max-width: 900px;
    width: 90%;
}

/* Modal body with grid layout */
#addCustomerModal .modal-body,
#editCustomerModal .modal-body {
    padding: 1.5rem;
}

/* Row container for fields */
.customer-modal-row {
    display: flex;
    flex-wrap: wrap;
    margin-bottom: 1rem;
    gap: 1rem;
}

/* Field wrapper - 2 columns */
.customer-modal-field {
    flex: 1 1 calc(50% - 0.5rem);
    min-width: 200px;
}

/* Field wrapper - 3 columns (for checkboxes) */
.customer-modal-field-3 {
    flex: 1 1 calc(33.333% - 0.67rem);
    min-width: 150px;
}

/* Full width field (for address) */
.customer-modal-field-full {
    flex: 1 1 100%;
}

/* Field styling */
.customer-modal-field label,
.customer-modal-field-3 label,
.customer-modal-field-full label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    font-size: 0.875rem;
    color: #495057;
}

.customer-modal-field .form-control,
.customer-modal-field-3 .form-control,
.customer-modal-field-full .form-control,
.customer-modal-field select,
.customer-modal-field-3 select,
.customer-modal-field-full select {
    width: 100%;
}

/* Checkbox styling */
.customer-modal-field-3 .form-check {
    margin: 0;
    padding: 0.5rem;
    border: 1px solid #e9ecef;
    border-radius: 0.25rem;
    background-color: #f8f9fa;
}

.customer-modal-field-3 .form-check-input {
    margin-top: 0.25rem;
}

.customer-modal-field-3 .form-check-label {
    margin-left: 0.5rem;
    margin-bottom: 0;
    font-weight: normal;
}

/* Address textarea - full width */
.customer-modal-field-full textarea {
    min-height: 80px;
    resize: vertical;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    #addCustomerModal .modal-dialog,
    #editCustomerModal .modal-dialog {
        width: 95%;
        margin: 0.5rem auto;
    }
    
    .customer-modal-field,
    .customer-modal-field-3 {
        flex: 1 1 100%;
    }
}

/* Ensure proper spacing */
.customer-modal-row:last-child {
    margin-bottom: 0;
}

