/* Custom Filament Logo Styling */

/* Sidebar logo styling - circular shape */
.fi-sidebar-header img {
    height: 3rem !important;
    width: 3rem !important;
    max-width: 3rem !important;
    min-width: 3rem !important;
    object-fit: cover !important;
    object-position: center !important;
    aspect-ratio: 1/1 !important;
    border-radius: 50% !important;
    background: transparent !important;
    overflow: hidden !important;
}

/* Login page logo styling - larger circular */
.fi-simple-header img {
    height: 5rem !important;
    width: 5rem !important;
    max-width: 5rem !important;
    min-width: 5rem !important;
    object-fit: cover !important;
    object-position: center !important;
    margin: 0 auto 2rem auto !important;
    display: block !important;
    aspect-ratio: 1/1 !important;
    border-radius: 50% !important;
    background: transparent !important;
    overflow: hidden !important;
}

/* Brand logo in header - circular */
.fi-sidebar-header .fi-sidebar-header-brand img {
    height: 3rem !important;
    width: 3rem !important;
    max-width: 3rem !important;
    min-width: 3rem !important;
    object-fit: cover !important;
    aspect-ratio: 1/1 !important;
    border-radius: 50% !important;
    background: transparent !important;
    overflow: hidden !important;
}

/* General logo container adjustments */
.fi-sidebar-header .fi-sidebar-header-brand {
    display: flex !important;
    align-items: center !important;
    gap: 0.75rem !important;
    min-height: 4rem !important;
    padding: 0.5rem 0 !important;
}

/* Login form logo container */
.fi-simple-header {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    margin-bottom: 1.5rem !important;
}

/* Sidebar header container adjustment */
.fi-sidebar-header {
    padding: 1rem !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1) !important;
}

/* Favicon optimization - will be circular */
link[rel="icon"] {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

/* RTL Support for logo */
[dir="rtl"] .fi-sidebar-header {
    text-align: right;
}

[dir="rtl"] .fi-sidebar-header img {
    margin-left: auto;
    margin-right: 0;
}

[dir="rtl"] .fi-sidebar-header .fi-sidebar-header-brand {
    justify-content: flex-end;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .fi-sidebar-header img {
        height: 2.5rem !important;
        width: 2.5rem !important;
        max-width: 2.5rem !important;
        border-radius: 50% !important;
        background: transparent !important;
        overflow: hidden !important;
    }
    
    .fi-simple-header img {
        height: 4rem !important;
        width: 4rem !important;
        max-width: 4rem !important;
        border-radius: 50% !important;
        background: transparent !important;
        overflow: hidden !important;
    }
}

/* ===== FILAMENT FORM LOADING SPINNER STYLES ===== */

/* Base loading animation */
@keyframes fi-spin {
    to {
        transform: rotate(360deg);
    }
}

/* Loading state for form components */
.fi-form-component-loading {
    position: relative !important;
    pointer-events: none !important;
    opacity: 0.7 !important;
    transition: opacity 0.2s ease !important;
}

.fi-form-component-loading::after {
    content: '' !important;
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    width: 20px !important;
    height: 20px !important;
    margin: -10px 0 0 -10px !important;
    border: 2px solid #5952FD !important;
    border-radius: 50% !important;
    border-top-color: transparent !important;
    animation: fi-spin 1s linear infinite !important;
    z-index: 10 !important;
}

/* Loading state for select components */
.fi-select-loading {
    position: relative !important;
    transition: opacity 0.2s ease !important;
}

.fi-select-loading .fi-select-input,
.fi-select-loading select,
.fi-select-loading .fi-select-wrapper {
    pointer-events: none !important;
    opacity: 0.7 !important;
}

.fi-select-loading::after {
    content: '' !important;
    position: absolute !important;
    top: 50% !important;
    right: 2.5rem !important;
    width: 16px !important;
    height: 16px !important;
    margin: -8px 0 0 0 !important;
    border: 2px solid #5952FD !important;
    border-radius: 50% !important;
    border-top-color: transparent !important;
    animation: fi-spin 1s linear infinite !important;
    z-index: 10 !important;
}

/* RTL support for select loading */
[dir="rtl"] .fi-select-loading::after {
    right: auto !important;
    left: 2.5rem !important;
}

/* Loading state for text input components */
.fi-text-input-loading {
    position: relative !important;
    transition: opacity 0.2s ease !important;
}

.fi-text-input-loading .fi-text-input,
.fi-text-input-loading input,
.fi-text-input-loading .fi-input-wrapper {
    pointer-events: none !important;
    opacity: 0.7 !important;
}

.fi-text-input-loading::after {
    content: '' !important;
    position: absolute !important;
    top: 50% !important;
    right: 0.75rem !important;
    width: 16px !important;
    height: 16px !important;
    margin: -8px 0 0 0 !important;
    border: 2px solid #5952FD !important;
    border-radius: 50% !important;
    border-top-color: transparent !important;
    animation: fi-spin 1s linear infinite !important;
    z-index: 10 !important;
}

/* RTL support for text input loading */
[dir="rtl"] .fi-text-input-loading::after {
    right: auto !important;
    left: 0.75rem !important;
}

/* Loading state for repeater items */
.fi-repeater-item-loading {
    position: relative !important;
    pointer-events: none !important;
    opacity: 0.8 !important;
    transition: opacity 0.2s ease !important;
}

.fi-repeater-item-loading::after {
    content: '' !important;
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    width: 24px !important;
    height: 24px !important;
    margin: -12px 0 0 -12px !important;
    border: 3px solid #5952FD !important;
    border-radius: 50% !important;
    border-top-color: transparent !important;
    animation: fi-spin 1s linear infinite !important;
    z-index: 10 !important;
}

/* Loading overlay for form sections */
.fi-form-section-loading {
    position: relative !important;
    pointer-events: none !important;
    transition: opacity 0.2s ease !important;
}

.fi-form-section-loading::before {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    background: rgba(255, 255, 255, 0.8) !important;
    z-index: 5 !important;
    border-radius: 0.5rem !important;
    backdrop-filter: blur(2px) !important;
}

.fi-form-section-loading::after {
    content: '' !important;
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    width: 30px !important;
    height: 30px !important;
    margin: -15px 0 0 -15px !important;
    border: 3px solid #5952FD !important;
    border-radius: 50% !important;
    border-top-color: transparent !important;
    animation: fi-spin 1s linear infinite !important;
    z-index: 10 !important;
}

/* Global loading overlay */
.fi-global-loading {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    background: rgba(0, 0, 0, 0.5) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 9999 !important;
    backdrop-filter: blur(4px) !important;
}

.fi-global-loading > div {
    background: white !important;
    padding: 2rem !important;
    border-radius: 1rem !important;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25) !important;
    text-align: center !important;
    min-width: 200px !important;
}

.fi-loading-text {
    margin-top: 1rem !important;
    font-weight: 600 !important;
    color: #374151 !important;
    font-size: 0.875rem !important;
}

/* Form submitting state */
.fi-form-submitting {
    position: relative !important;
    pointer-events: none !important;
    opacity: 0.8 !important;
    transition: opacity 0.2s ease !important;
}

.fi-form-submitting::before {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    background: rgba(255, 255, 255, 0.9) !important;
    z-index: 5 !important;
    border-radius: 0.5rem !important;
    backdrop-filter: blur(2px) !important;
}

.fi-form-submitting::after {
    content: '' !important;
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    width: 40px !important;
    height: 40px !important;
    margin: -20px 0 0 -20px !important;
    border: 4px solid #5952FD !important;
    border-radius: 50% !important;
    border-top-color: transparent !important;
    animation: fi-spin 1s linear infinite !important;
    z-index: 10 !important;
}

/* Enhanced field loading states */
.fi-field.fi-select-loading,
.fi-field.fi-text-input-loading,
.fi-field.fi-form-component-loading {
    position: relative !important;
    transition: all 0.2s ease !important;
}

.fi-field.fi-select-loading::before,
.fi-field.fi-text-input-loading::before,
.fi-field.fi-form-component-loading::before {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    background: rgba(89, 82, 253, 0.05) !important;
    border-radius: 0.375rem !important;
    z-index: 1 !important;
}

/* Loading states for specific Filament components */
.fi-select-field.fi-select-loading .fi-select-wrapper,
.fi-text-input-field.fi-text-input-loading .fi-input-wrapper {
    position: relative !important;
}

/* Disable interactions during loading */
.fi-select-loading *,
.fi-text-input-loading *,
.fi-repeater-item-loading *,
.fi-form-section-loading *,
.fi-form-component-loading * {
    pointer-events: none !important;
}

/* Loading indicator for buttons */
.fi-btn-loading {
    position: relative !important;
    color: transparent !important;
    pointer-events: none !important;
}

.fi-btn-loading::after {
    content: '' !important;
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    width: 16px !important;
    height: 16px !important;
    margin: -8px 0 0 -8px !important;
    border: 2px solid currentColor !important;
    border-radius: 50% !important;
    border-top-color: transparent !important;
    animation: fi-spin 1s linear infinite !important;
}

/* Loading states for grid components */
.fi-grid.fi-form-section-loading {
    position: relative !important;
}

.fi-grid.fi-form-section-loading > * {
    pointer-events: none !important;
    opacity: 0.7 !important;
}

/* Loading states for section components */
.fi-section.fi-form-section-loading {
    position: relative !important;
}

.fi-section.fi-form-section-loading .fi-section-content {
    pointer-events: none !important;
    opacity: 0.7 !important;
}

/* Responsive loading adjustments */
@media (max-width: 768px) {
    .fi-global-loading > div {
        margin: 1rem !important;
        padding: 1.5rem !important;
        min-width: 150px !important;
    }
    
    .fi-loading-text {
        font-size: 0.75rem !important;
    }
    
    .fi-form-component-loading::after,
    .fi-select-loading::after,
    .fi-text-input-loading::after {
        width: 14px !important;
        height: 14px !important;
        margin: -7px 0 0 -7px !important;
    }
} 