/**
 * Modal Animations and Styles
 */

/* Fade animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

/* Slide animations */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes slideOutDown {
    from {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    to {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
}

/* Animation classes */
.animate-fadeIn {
    animation: fadeIn 0.2s ease-out forwards;
}

.animate-fadeOut {
    animation: fadeOut 0.2s ease-in forwards;
}

.animate-slideInUp {
    animation: slideInUp 0.3s ease-out forwards;
}

.animate-slideOutDown {
    animation: slideOutDown 0.2s ease-in forwards;
}

/* Modal specific styles */
.modal-backdrop {
    backdrop-filter: blur(2px);
}

.modal-dialog {
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

/* Ensure modal is above everything */
#modal-container {
    z-index: 99999 !important;
}

/* Hide modal content by default */
.modal-content {
    display: none;
}

/* Contract Modal Styles */
.contrato-container {
    max-width: 100%;
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #333;
}

.contrato-titulo {
    text-align: center;
    font-size: 1.5rem;
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 1.5rem;
    padding: 1rem;
    border-bottom: 2px solid #3498db;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.contrato-texto {
    margin-bottom: 1.25rem;
    text-align: justify;
    font-size: 0.95rem;
    color: #555;
    line-height: 1.7;
}

.contrato-subtitulo {
    font-size: 1.1rem;
    font-weight: bold;
    color: #2c3e50;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    padding: 0.5rem 0;
    border-left: 4px solid #3498db;
    padding-left: 1rem;
    background-color: #f8f9fa;
}

.contrato-lista {
    margin-bottom: 1.25rem;
    padding-left: 1.5rem;
}

.contrato-lista li {
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: #666;
    line-height: 1.6;
    position: relative;
}

.contrato-lista li::marker {
    color: #3498db;
    font-weight: bold;
}

.contrato-nota {
    background-color: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 0.375rem;
    padding: 1rem;
    margin: 1.5rem 0;
    font-style: italic;
    text-align: center;
    color: #856404;
    font-weight: 500;
}

.contrato-nota strong {
    color: #721c24;
    font-weight: bold;
}

/* Responsive adjustments for contract modal */
@media (max-width: 768px) {
    .contrato-titulo {
        font-size: 1.25rem;
        padding: 0.75rem;
    }
    
    .contrato-texto {
        font-size: 0.9rem;
    }
    
    .contrato-subtitulo {
        font-size: 1rem;
        margin-top: 1.25rem;
    }
    
    .contrato-lista li {
        font-size: 0.85rem;
    }
}

/* Contract modal specific adjustments */
.modal-dialog {
    max-width: 900px;
}

/* When modal contains contract, make it larger */
.modal-dialog:has(.contrato-container) {
    max-width: 900px;
    width: 95%;
}

.modal-body:has(.contrato-container) {
    max-height: 75vh;
    overflow-y: auto;
    padding: 1.5rem;
}

/* Improve scrollbar for contract content */
.modal-body:has(.contrato-container)::-webkit-scrollbar {
    width: 8px;
}

.modal-body:has(.contrato-container)::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.modal-body:has(.contrato-container)::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

.modal-body:has(.contrato-container)::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}
