/* Property Edit Modal - Collapsible Sections with Mission Control Theme */

/* Simple (Non-collapsible) Sections */
.simple-section {
    margin-bottom: 20px;
    padding: 16px;
    background: linear-gradient(135deg, #f9fafb 0%, #ffffff 100%);
    border: 1px solid #e5e7eb;
    border-radius: 8px;
}

.simple-section-title {
    font-size: 15px;
    font-weight: 600;
    color: #1f2937;
    margin: 0 0 12px 0;
    padding-bottom: 8px;
    border-bottom: 2px solid #e5e7eb;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Collapsible Sections */
.collapsible-section {
    margin-bottom: 12px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
    background: #ffffff;
    transition: all 0.2s ease;
}

.collapsible-section:hover {
    border-color: #3b82f6;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.1);
}

.section-header {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%);
    border: none;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    color: #1f2937;
    text-align: left;
    transition: all 0.2s ease;
    position: relative;
}

.section-header:hover {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    color: #3b82f6;
}

.section-header:active {
    transform: scale(0.99);
}

.section-header.collapsed {
    background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%);
}

.section-header.collapsed:hover {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
}

.section-icon {
    font-size: 20px;
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.section-header:hover .section-icon {
    transform: scale(1.1);
}

.section-title {
    flex: 1;
    font-weight: 600;
}

.chevron {
    font-size: 12px;
    transition: transform 0.3s ease;
    color: #6b7280;
}

.section-header:not(.collapsed) .chevron {
    transform: rotate(180deg);
}

.section-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    padding: 0 16px;
}

.section-header:not(.collapsed)+.section-content {
    max-height: 1000px;
    padding: 16px;
    border-top: 1px solid #e5e7eb;
}

/* Mission Control Styling for Form Elements */
.collapsible-section .form-group {
    margin-bottom: 16px;
}

.collapsible-section .form-group:last-child {
    margin-bottom: 0;
}

.collapsible-section input[readonly],
.collapsible-section input[disabled] {
    background-color: #f9fafb !important;
    cursor: not-allowed;
    border-color: #e5e7eb;
}

.collapsible-section textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.collapsible-section textarea:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Auto-calculated field styling */
.collapsible-section input[readonly]::placeholder {
    color: #9ca3af;
    font-style: italic;
}

/* Checkbox styling within sections */
.collapsible-section .checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 10px;
    border-radius: 6px;
    transition: background-color 0.2s ease;
}

.collapsible-section .checkbox-label:hover {
    background-color: #f3f4f6;
}

/* Special styling for Status Flags section */
#section-status-flags .form-row {
    gap: 16px;
}

#section-status-flags .checkbox-label {
    border: 1px solid #e5e7eb;
    padding: 12px;
    border-radius: 8px;
}

#section-status-flags .checkbox-label:hover {
    border-color: #3b82f6;
    background-color: #eff6ff;
}

/* Amenities textarea special styling */
#editAmenities {
    min-height: 80px;
}

/* Modal body scrollbar styling */
#listingEditModal .modal-body::-webkit-scrollbar {
    width: 8px;
}

#listingEditModal .modal-body::-webkit-scrollbar-track {
    background: #f3f4f6;
    border-radius: 4px;
}

#listingEditModal .modal-body::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 4px;
}

#listingEditModal .modal-body::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

/* Policy Groups */
.policy-group {
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e5e7eb;
}

.policy-group:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.policy-group-title {
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    margin: 0 0 12px 0;
    padding: 8px 12px;
    background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%);
    border-radius: 6px;
    border-left: 3px solid #3b82f6;
}

.checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px;
}

/* Policy checkbox styling - simpler than status flags */
#section-policies .checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
    color: #4b5563;
    padding: 10px 12px;
    border-radius: 6px;
    border: 1px solid #e5e7eb;
    transition: all 0.2s ease;
    background: #ffffff;
}

#section-policies .checkbox-label:hover {
    background-color: #f9fafb;
    border-color: #3b82f6;
}

#section-policies .checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #3b82f6;
    flex-shrink: 0;
}

/* Hide the checkmark span for policy checkboxes - using native checkbox */
#section-policies .checkbox-label .checkmark {
    display: none;
}