/* Property Editor Form Components - Specific styling for modal forms */

/* Main property form container */
.propertyFormBody {
    padding: 0;
    background-color: #f8f9fa;
    font-family: 'Poppins', Arial, Helvetica, sans-serif;
    height: 100%;
    overflow-y: auto;
    max-height: 70vh; /* Limit height to 70% of viewport */
}

.propertyFormPanel {
    background-color: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 16px;
}

/* Property form field containers - Stack labels above inputs */
.propertyFormField {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 16px;
    width: 100%;
}

.propertyFormField.fullWidth {
    width: 100%;
}

.propertyFormField.readOnly {
    flex-direction: row;
    align-items: center;
    gap: 12px;
}

.propertyFormField.readOnly label {
    min-width: 120px;
    margin-bottom: 0;
}

/* Property form labels - positioned above inputs */
.propertyFormField label {
    font-size: 13px;
    font-weight: 500;
    color: #495057;
    margin: 0 0 4px 0;
    text-align: left;
    display: block;
}

.propertyFormField label.form-label {
    color: #6c757d;
    font-weight: 400;
    background-color: #f8f9fa;
    padding: 8px 12px;
    border-radius: 4px;
    border: 1.5px solid #e9ecef;
    margin: 0;
}

/* Property form inputs - full width */
.propertyFormField input.form-control,
.propertyFormField textarea.form-control,
.propertyFormField select.form-control {
    font-size: 13px;
    padding: 8px 12px;
    border: 1.5px solid #ced4da;
    border-radius: 4px;
    background-color: white;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
    width: 100%;
    box-sizing: border-box;
}

.propertyFormField input.form-control:focus,
.propertyFormField textarea.form-control:focus,
.propertyFormField select.form-control:focus {
    border: 1.5px solid #102b7c;
    outline: 0;
    border-radius: 4px;
    box-shadow: none;
}

.propertyFormField textarea.form-control {
    min-height: 80px;
    resize: vertical;
}

/* Radio button groups */
.propertyFormField .radio-list {
    display: flex;
    gap: 8px;
    list-style: none;
    padding: 0;
    margin: 0;
}

/* Small spacing below radio-list to prevent tight stacking in forms */
.propertyFormField .radio-list {
    margin-bottom: 2px;
}

.propertyFormField .radio-list li {
    margin: 0;
}

.propertyFormField .radio-list .btn {
    font-size: 12px;
    padding: 6px 12px;
    border-radius: 4px;
    border: 1.5px solid #ced4da;
    background-color: white;
    color: #495057;
    cursor: pointer;
    transition: all 0.15s ease-in-out;
}

.propertyFormField .radio-list .btn:hover {
    background-color: #e9ecef;
    border-color: #adb5bd;
}

.propertyFormField .radio-list .btn.btn-primary-theme,
.propertyFormField .radio-list .btn[aria-pressed="true"] {
    background-color: #102b7c;
    border-color: #102b7c;
    color: white;
}

/* Dropdown selects with buttons */
.propertyFormField .input-group {
    display: flex;
    width: 100%;
}

.propertyFormField .propertyEditorButton {
    font-size: 12px;
    padding: 6px 8px;
    border-left: none;
    border-radius: 0 4px 4px 0;
    background-color: #f8f9fa;
    border-color: #ced4da;
    flex-shrink: 0;
}

.propertyFormField input.form-control + .propertyEditorButton {
    border-left: none;
}

/* Inline input + button combination */
.propertyFormField input.propertyEditor + .propertyEditorButton {
    margin-left: -1px;
}

/* Property page sections */
.propertyFormPage {
    background-color: white;
    border-radius: 6px;
    padding: 20px;
    margin-top: 16px;
}

.addView .panelFrame {
    width: 780px !important;
}

/* Panel groups (sections with headers) */
.propertyPanelGroup {
    margin-bottom: 20px;
    border: 1.5px solid #e9ecef;
    border-radius: 6px;
    overflow: hidden;
}

.propertyPanelGroup h5 {
    background-color: #f8f9fa;
    margin: 0;
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 600;
    color: #495057;
    border-bottom: 1px solid #e9ecef;
}

.propertyPanelGroup .propertyFormPanel {
    border-radius: 0;
    margin: 0;
    box-shadow: none;
    border: none;
}

/* Dropdown menus */
.propertyFormField .dropdown-menu {
    max-height: 200px;
    overflow-y: auto;
    font-size: 13px;
    width: 100%;
}

.propertyFormField .dropdown-item {
    padding: 6px 12px;
    font-size: 13px;
}

.propertyFormField .dropdown-item input[type="checkbox"] {
    margin-right: 8px;
}

/* Search inputs in dropdowns */
.propertyFormField .appSearchBar {
    padding: 8px 12px;
    border-bottom: 1px solid #e9ecef;
}

.propertyFormField .appSearchBar input {
    width: 100%;
    border: 1.5px solid #ced4da;
    border-radius: 4px;
    padding: 6px 8px;
    font-size: 12px;
}

/* Modal adjustments for better fit */
.modal-dialog {
    max-width: 80%; /* Reduce from default 100% to 80% */
    margin: 1.75rem auto;
}

.modal-content {
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

.modal-header {
    flex-shrink: 0;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #e9ecef;
}

/* Ensure modal body scrolls properly */
.modal-body.propertyFormBody {
    flex: 1;
    padding: 12px;
    overflow-y: auto;
    max-height: calc(90vh - 120px); /* Account for header and footer */
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .modal-dialog {
        max-width: 95%;
        margin: 0.5rem auto;
    }
    
    .propertyFormField.readOnly {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }
    
    .propertyFormField.readOnly label {
        min-width: auto;
        margin-bottom: 4px;
    }
}
