/* ============================================================================
   Admin Modal Styles - Global styles for all admin forms and modals
   ============================================================================ */

/* Admin Form Container */
.admin-form {
    max-height: 75vh;
    overflow-y: auto;
    padding: 0.5rem;
}

/* Form Sections */
.form-section {
    margin-bottom: 2rem;
    padding: 1.25rem;
    background: #f8f9fa;
    border-radius: 0.5rem;
    border-left: 4px solid var(--bs-primary, #0d6efd);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.2s ease-in-out;
}

.form-section:hover {
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

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

/* Section Titles */
.section-title {
    color: var(--bs-primary, #0d6efd);
    font-weight: 600;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #dee2e6;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.section-title i {
    font-size: 1rem;
    opacity: 0.8;
}

/* Form Content Area */
.form-section .row {
    background: white;
    margin: 0;
    padding: 1rem;
    border-radius: 0.375rem;
    border: 1px solid #dee2e6;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.04);
}

/* Form Controls Enhancement */
.admin-form .form-control,
.admin-form .form-select {
    border-radius: 0.375rem;
    border: 1px solid #ced4da;
    transition: all 0.2s ease-in-out;
}

.admin-form .form-control:focus,
.admin-form .form-select:focus {
    border-color: var(--bs-primary, #0d6efd);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
    transform: translateY(-1px);
}

/* Form Labels */
.admin-form .form-label {
    font-weight: 500;
    color: #495057;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.admin-form .form-label .text-danger {
    font-size: 0.8rem;
}

/* Form Text (Help Text) */
.admin-form .form-text {
    font-size: 0.8rem;
    color: #6c757d;
    margin-top: 0.25rem;
    font-style: italic;
}

/* Validation Styles */
.admin-form .is-invalid {
    border-color: #dc3545;
    background-image: url("data:image/svg+xml;charset=utf-8,%3csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%23dc3545' viewBox='0 0 12 12'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

.admin-form .invalid-feedback {
    display: block;
    width: 100%;
    margin-top: 0.25rem;
    font-size: 0.875rem;
    color: #dc3545;
}

/* Checkbox Styles */
.admin-form .form-check {
    padding-left: 1.5rem;
    margin-bottom: 0.5rem;
}

.admin-form .form-check-input {
    margin-left: -1.5rem;
    border-radius: 0.25rem;
    transition: all 0.2s ease-in-out;
}

.admin-form .form-check-input:checked {
    background-color: var(--bs-primary, #0d6efd);
    border-color: var(--bs-primary, #0d6efd);
    transform: scale(1.1);
}

.admin-form .form-check-label {
    font-size: 0.9rem;
    color: #495057;
    cursor: pointer;
}

/* Textarea Enhancement */
.admin-form textarea.form-control {
    resize: vertical;
    min-height: 80px;
}

/* CKEditor Integration */
.admin-form .ck-editor__editable {
    min-height: 150px;
    border-radius: 0.375rem;
}

/* Button Enhancements */
.admin-form .btn {
    border-radius: 0.375rem;
    font-weight: 500;
    transition: all 0.2s ease-in-out;
}

.admin-form .btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .admin-form {
        max-height: 80vh;
        padding: 0.25rem;
    }
    
    .form-section {
        padding: 1rem;
        margin-bottom: 1.5rem;
    }
    
    .form-section .row {
        padding: 0.75rem;
    }
    
    .section-title {
        font-size: 0.9rem;
        margin-bottom: 0.75rem;
    }
    
    .admin-form .form-label {
        font-size: 0.85rem;
    }
    
    .admin-form .form-control,
    .admin-form .form-select {
        font-size: 0.9rem;
        padding: 0.5rem 0.75rem;
    }
}

@media (max-width: 576px) {
    .admin-form {
        max-height: 85vh;
    }
    
    .form-section {
        padding: 0.75rem;
        margin-bottom: 1rem;
        border-left-width: 3px;
    }
    
    .section-title {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }
    
    .section-title i {
        margin-right: 0;
        margin-bottom: 0.25rem;
    }
}

/* Color Variations for Different Modal Types */
.admin-form.announcements .form-section {
    border-left-color: #28a745;
}

.admin-form.announcements .section-title {
    color: #28a745;
}

.admin-form.events .form-section {
    border-left-color: #17a2b8;
}

.admin-form.events .section-title {
    color: #17a2b8;
}

.admin-form.users .form-section {
    border-left-color: #6f42c1;
}

.admin-form.users .section-title {
    color: #6f42c1;
}

/* Loading States */
.admin-form [wire\:loading] {
    opacity: 0.6;
    pointer-events: none;
}

.admin-form [wire\:loading\.remove] {
    opacity: 1;
    pointer-events: auto;
}

/* Utility Classes */
.admin-form .text-muted-light {
    color: #8d9498 !important;
}

.admin-form .border-start-primary {
    border-left: 3px solid var(--bs-primary, #0d6efd) !important;
}

.admin-form .bg-light-subtle {
    background-color: rgba(248, 249, 250, 0.5) !important;
}

/* Modal Enhancements */
.modal-content {
    border-radius: 0.5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.modal-header {
    background: linear-gradient(135deg, var(--bs-primary, #0d6efd), var(--bs-primary-dark, #0b5ed7));
    color: white;
    border-radius: 0.5rem 0.5rem 0 0;
}

.modal-header .modal-title {
    font-weight: 600;
    font-size: 1.1rem;
}

.modal-header .btn-close {
    filter: invert(1);
    opacity: 0.8;
}

.modal-header .btn-close:hover {
    opacity: 1;
    transform: scale(1.1);
}

.modal-footer {
    background-color: #f8f9fa;
    border-radius: 0 0 0.5rem 0.5rem;
    border-top: 1px solid #dee2e6;
}

/* Scrollbar Styling */
.admin-form::-webkit-scrollbar {
    width: 6px;
}

.admin-form::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.admin-form::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.admin-form::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}
