/**
 * Shared Form Components CSS
 * Global utilities for CRUD module styling
 * Used across superadmin/schools, superadmin/teachers, etc.
 */

/* Loading Spinner in Buttons */
.btn-loading-spinner {
    width: 1rem;
    height: 1rem;
}

/* Toast Notification Styles */
.toastify.default {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.toastify.info {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.toastify.success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.toastify.error {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

.toastify.warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

/* Select2 Bootstrap 5 Integration */
.select2-container--bootstrap-5 .select2-selection--single {
    height: calc(1.5em + 0.75rem + 2px);
    display: flex;
    align-items: center;
}

.select2-container--bootstrap-5.select2-container--focus .select2-selection,
.select2-container--bootstrap-5.select2-container--open .select2-selection {
    border-color: var(--vz-primary);
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

/* Generic Badge Group */
.badge-group {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    align-items: center;
}

/* Generic Section Header */
.section-header {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--vz-primary);
    margin-bottom: 1.25rem;
    letter-spacing: 1px;
    background: linear-gradient(90deg, var(--vz-light) 0%, transparent 100%);
    padding: 0.75rem 1rem;
    border-left: 3px solid var(--vz-primary);
    border-radius: 0.25rem;
    display: block;
}

/* Generic Info Display Section */
.info-section {
    margin-bottom: 1.5rem;
}

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

.info-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.info-field {
    display: flex;
    flex-direction: column;
}

.info-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--vz-text-muted);
    margin-bottom: 0.25rem;
    letter-spacing: 0.5px;
}

.info-value {
    font-size: 0.95rem;
    color: var(--vz-body-color);
    word-break: break-word;
}

.info-value a {
    color: var(--vz-primary);
    text-decoration: none;
}

.info-value a:hover {
    text-decoration: underline;
}

/* Generic Header with Logo/Avatar */
.view-header {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--vz-border-color);
    margin-bottom: 1.5rem;
}

.logo-container {
    flex-shrink: 0;
}

.logo-image {
    width: 100px;
    height: 100px;
    border-radius: 0.5rem;
    object-fit: cover;
    border: 1px solid var(--vz-border-color);
}

.logo-fallback {
    width: 100px;
    height: 100px;
    border-radius: 0.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2.5rem;
    font-weight: 600;
}

/* Drawer/Offcanvas Utilities */
.drawer-actions {
    gap: 0.75rem;
}

.offcanvas-bottom {
    height: min(88vh, 760px);
    max-height: 88vh;
}

.offcanvas-bottom .offcanvas-body {
    overflow-y: auto;
}

/* Generic Link Styling */
.entity-name-link {
    color: inherit;
    text-decoration: none;
}

.entity-name-link:hover {
    color: var(--vz-primary);
}
