/* Al Rescate - Estilos Adicionales */

/* Navegación activa */
.nav-btn.active {
    background: rgba(255, 255, 255, 0.25);
    font-weight: 600;
}

/* Vista activa */
.view-btn.active {
    background: #d1fae5;
    color: #059669;
}

/* Animaciones de entrada */
.module-section {
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Toast notifications */
.toast {
    animation: slideIn 0.3s ease-out;
    min-width: 300px;
    max-width: 400px;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.toast-exit {
    animation: slideOut 0.3s ease-in forwards;
}

@keyframes slideOut {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(100%);
    }
}

/* Card de mascota en consulta */
.pet-card {
    transition: all 0.3s ease;
    border: 1px solid #e5e7eb;
}

.pet-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px -8px rgba(0, 0, 0, 0.15);
    border-color: #10b981;
}

/* Card de resultado de búsqueda */
.search-result-card {
    transition: all 0.2s ease;
    cursor: pointer;
}

.search-result-card:hover {
    background: #f0fdf4;
    border-color: #10b981;
}

.search-result-card.selected {
    background: #d1fae5;
    border-color: #059669;
}

/* Loading spinner personalizado */
.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

/* Botones con estado de carga */
button.loading {
    position: relative;
    color: transparent !important;
}

button.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border: 2px solid #ffffff;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Inputs con foco mejorado */
input:focus,
select:focus,
textarea:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
}

/* Tabla responsive */
@media (max-width: 768px) {
    #vista-tabla table {
        font-size: 0.75rem;
    }

    #vista-tabla th,
    #vista-tabla td {
        padding: 0.5rem;
    }
}

/* Imagen de mascota en card */
.pet-image {
    width: 100%;
    height: 180px;
    object-fit: cover;
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
}

.pet-image-placeholder {
    width: 100%;
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    font-size: 4rem;
}

/* Preview de imagen mejorado */
#preview-container {
    transition: all 0.3s ease;
}

#preview-container:hover {
    border-color: #10b981;
}

/* Scrollbar personalizada */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #10b981;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #059669;
}

/* Efecto de pulso para elementos importantes */
.pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(16, 185, 129, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
    }
}

/* Badge de especie */
.badge-perro {
    background: #fef3c7;
    color: #92400e;
}

.badge-gato {
    background: #e0e7ff;
    color: #3730a3;
}

/* Transiciones suaves para elementos de formulario */
.form-input {
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

/* Estado deshabilitado de botones */
button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Estilo para mobile menu */
#mobile-menu {
    animation: slideDown 0.2s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
