/* SchoolEditModal Component Styles */

/* Modal Overlay */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    overflow-y: auto;
    padding: 20px;
}

/* Modal Content */
.school-edit-modal.modal-content {
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
    display: flex;
    flex-direction: column;
    max-height: 90vh;
    width: 95%;
}

.school-edit-modal.modal-large {
    max-width: 1200px;
}

/* Modal Header */
.school-edit-modal .modal-header {
    flex-shrink: 0;
}

.school-edit-modal .modal-header h2 {
    color: white !important;
}

/* Tab Navigation */
.school-edit-modal .tab-nav {
    flex-shrink: 0;
}

.school-edit-modal .tab-nav button:hover {
    background: rgba(91, 45, 142, 0.05);
}

/* Modal Body */
.school-edit-modal .modal-body {
    overflow-y: auto;
    flex: 1;
}

/* Form Fields */
.school-edit-modal .form-field {
    margin-bottom: 0.25rem;
}

.school-edit-modal .form-field label {
    color: #372562;
}

.school-edit-modal .form-field input,
.school-edit-modal .form-field select,
.school-edit-modal .form-field textarea {
    color: #372562;
    font-size: 0.9rem;
    box-sizing: border-box;
}

.school-edit-modal .form-field input:focus,
.school-edit-modal .form-field select:focus {
    outline: none;
    border-color: #372562;
    box-shadow: 0 0 0 2px rgba(232, 114, 106, 0.15);
}

/* Read-only field styling */
.school-edit-modal .read-only-value {
    font-size: 0.9rem;
    min-height: 2.1rem;
    display: flex;
    align-items: center;
}

/* Buttons */
.school-edit-modal .btn {
    padding: 0.5rem 1.25rem;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.school-edit-modal .btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.school-edit-modal .btn-primary {
    background: linear-gradient(135deg, #ec5f59 0%, #D4605A 100%);
    color: white;
}

.school-edit-modal .btn-primary:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(91, 45, 142, 0.4);
}

.school-edit-modal .btn-secondary {
    background: white;
    color: #372562;
    border: 1px solid #ccc;
}

.school-edit-modal .btn-secondary:hover:not(:disabled) {
    background: #F0F7F5;
}

.school-edit-modal .btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

/* Loading State */
.school-edit-modal .loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    color: #6c757d;
}

.school-edit-modal .spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #97c1bc;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    animation: sem-spin 0.8s linear infinite;
    margin-bottom: 12px;
}

@keyframes sem-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Error / Success Messages */
.school-edit-modal .error-message {
    background-color: #f8d7da;
    color: #721c24;
    padding: 0.75rem 1rem;
    border-radius: 6px;
    border: 1px solid #f5c6cb;
    margin-bottom: 1rem;
    font-size: 14px;
}

.school-edit-modal .success-message {
    background-color: #d4edda;
    color: #155724;
    padding: 0.75rem 1rem;
    border-radius: 6px;
    border: 1px solid #c3e6cb;
    margin-bottom: 1rem;
    font-size: 14px;
}

/* Brand text colour */
.school-edit-modal,
.school-edit-modal label,
.school-edit-modal td,
.school-edit-modal th,
.school-edit-modal input,
.school-edit-modal textarea,
.school-edit-modal select {
    color: #372562;
}

/* Responsive Styles */
@media (max-width: 768px) {
    .modal-overlay {
        padding: 10px;
    }

    .school-edit-modal.modal-content {
        max-height: 95vh;
        width: 100%;
        border-radius: 8px;
    }

    .school-edit-modal .modal-body div[style*="grid-template-columns: 1fr 1fr"] {
        grid-template-columns: 1fr !important;
    }

    .school-edit-modal .tab-nav {
        flex-direction: column;
    }

    .school-edit-modal .tab-nav button {
        text-align: left;
        padding-left: 1.5rem;
    }
}
