/* Estilos para Modal Lateral Reutilizável */

.side-modal-overlay {
    backdrop-filter: blur(2px);
}

.side-modal {
    max-height: 100vh;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.side-modal-content {
    max-height: calc(100vh - 120px); /* Ajustar baseado no header e footer */
}

/* Animações suaves */
.side-modal-enter {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.side-modal-leave {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Responsividade */
@media (max-width: 768px) {
    .side-modal {
        width: 100% !important;
        max-width: 100% !important;
    }
}

/* Estilos para scroll customizado global */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #d1d5db 0%, #dfdfdf 100%);
    border-radius: 10px;
    border: 2px solid transparent;
    background-clip: content-box;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #dfdfdf 0%, #6b7280 100%);
    background-clip: content-box;
}

::-webkit-scrollbar-corner {
    background: transparent;
}

/* Firefox scroll styling */
* {
    scrollbar-width: thin;
    scrollbar-color: #dfdfdf transparent;
}

/* Estilos para scroll customizado em modais */
.side-modal .overflow-y-auto::-webkit-scrollbar {
    width: 6px;
}

.side-modal .overflow-y-auto::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.side-modal .overflow-y-auto::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.side-modal .overflow-y-auto::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Estados de focus para acessibilidade */
.side-modal:focus {
    outline: none;
}

.side-modal button:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* Loading state */
.side-modal-loading {
    position: relative;
}

.side-modal-loading::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.side-modal-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 32px;
    height: 32px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    z-index: 11;
}

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

/* Tamanhos predefinidos */
.side-modal-xs { width: 280px; }
.side-modal-sm { width: 320px; }
.side-modal-md { width: 384px; }
.side-modal-lg { width: 512px; }
.side-modal-xl { width: 640px; }
.side-modal-2xl { width: 768px; }
.side-modal-full { width: 100%; }

/* Variações de cor do header */
.side-modal-header-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.side-modal-header-success {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
}

.side-modal-header-warning {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
}

.side-modal-header-danger {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
    color: white;
}
