/**
 * MICROINTERACCIONES
 * Pequeños detalles que mejoran la experiencia del usuario
 */

/* ============================================
   HOVER STATES MEJORADOS
   ============================================ */
.interactive-element {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.interactive-element:hover {
    transform: translateY(-2px);
}

.interactive-element:active {
    transform: translateY(0);
}

/* ============================================
   BUTTON PRESS EFFECT
   ============================================ */
.btn-press-effect:active {
    transform: scale(0.95);
    transition: transform 0.1s ease;
}

/* ============================================
   INPUT FOCUS ANIMATION
   ============================================ */
.input-focus-animation {
    position: relative;
}

.input-focus-animation::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateX(-50%);
}

.input-focus-animation:focus::after {
    width: 100%;
}

/* ============================================
   CHECKBOX ANIMATION
   ============================================ */
.checkbox-animated input[type="checkbox"]:checked + label::before {
    animation: checkmark 0.3s ease;
}

@keyframes checkmark {
    0% {
        transform: scale(0) rotate(45deg);
    }
    50% {
        transform: scale(1.2) rotate(45deg);
    }
    100% {
        transform: scale(1) rotate(45deg);
    }
}

/* ============================================
   LOADING DOTS
   ============================================ */
.loading-dots {
    display: inline-flex;
    gap: 4px;
}

.loading-dots span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #667eea;
    animation: loadingDot 1.4s ease-in-out infinite;
}

.loading-dots span:nth-child(1) {
    animation-delay: 0s;
}

.loading-dots span:nth-child(2) {
    animation-delay: 0.2s;
}

.loading-dots span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes loadingDot {
    0%, 80%, 100% {
        transform: scale(0);
        opacity: 0.5;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

/* ============================================
   SUCCESS CHECKMARK
   ============================================ */
.success-checkmark {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: scaleIn 0.3s ease;
}

.success-checkmark::after {
    content: '✓';
    color: white;
    font-size: 24px;
    font-weight: bold;
    animation: checkmarkDraw 0.5s ease;
}

@keyframes checkmarkDraw {
    0% {
        transform: scale(0) rotate(45deg);
    }
    50% {
        transform: scale(1.2) rotate(45deg);
    }
    100% {
        transform: scale(1) rotate(0deg);
    }
}

/* ============================================
   ERROR X MARK
   ============================================ */
.error-xmark {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f5576c 0%, #f093fb 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: scaleIn 0.3s ease;
    position: relative;
}

.error-xmark::before,
.error-xmark::after {
    content: '';
    position: absolute;
    width: 24px;
    height: 3px;
    background: white;
    border-radius: 2px;
}

.error-xmark::before {
    transform: rotate(45deg);
    animation: xmarkDraw1 0.3s ease;
}

.error-xmark::after {
    transform: rotate(-45deg);
    animation: xmarkDraw2 0.3s ease;
}

@keyframes xmarkDraw1 {
    0% {
        transform: rotate(45deg) scale(0);
    }
    100% {
        transform: rotate(45deg) scale(1);
    }
}

@keyframes xmarkDraw2 {
    0% {
        transform: rotate(-45deg) scale(0);
    }
    100% {
        transform: rotate(-45deg) scale(1);
    }
}

/* ============================================
   PULSE RING
   ============================================ */
.pulse-ring {
    position: relative;
}

.pulse-ring::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    border: 2px solid #667eea;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    animation: pulseRing 2s ease-out infinite;
}

@keyframes pulseRing {
    0% {
        transform: translate(-50%, -50%) scale(0.8);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) scale(1.5);
        opacity: 0;
    }
}

/* ============================================
   SHIMMER EFFECT
   ============================================ */
.shimmer-effect {
    position: relative;
    overflow: hidden;
}

.shimmer-effect::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

/* ============================================
   BOUNCE ANIMATION
   ============================================ */
.bounce-in {
    animation: bounceIn 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.bounce-out {
    animation: bounceOut 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes bounceOut {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(0);
        opacity: 0;
    }
}

/* ============================================
   FADE TRANSITIONS
   ============================================ */
.fade-in {
    animation: fadeIn 0.5s ease;
}

.fade-out {
    animation: fadeOut 0.5s ease;
}

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

/* ============================================
   SLIDE TRANSITIONS
   ============================================ */
.slide-in-right {
    animation: slideInRight 0.5s ease;
}

.slide-in-left {
    animation: slideInLeft 0.5s ease;
}

.slide-out-right {
    animation: slideOutRight 0.5s ease;
}

.slide-out-left {
    animation: slideOutLeft 0.5s ease;
}

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

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

/* ============================================
   ROTATE ANIMATIONS
   ============================================ */
.rotate-in {
    animation: rotateIn 0.5s ease;
}

.rotate-out {
    animation: rotateOut 0.5s ease;
}

@keyframes rotateOut {
    from {
        transform: rotate(0deg);
        opacity: 1;
    }
    to {
        transform: rotate(180deg);
        opacity: 0;
    }
}

/* ============================================
   ZOOM ANIMATIONS
   ============================================ */
.zoom-in {
    animation: zoomIn 0.5s ease;
}

.zoom-out {
    animation: zoomOut 0.5s ease;
}

@keyframes zoomOut {
    from {
        transform: scale(1);
        opacity: 1;
    }
    to {
        transform: scale(0);
        opacity: 0;
    }
}

/* ============================================
   NOTIFICATION TOAST
   ============================================ */
.toast-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    border-radius: 12px;
    padding: 16px 20px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
    z-index: 10000;
    animation: slideInRight 0.3s ease;
    max-width: 400px;
}

.toast-notification.success {
    border-left: 4px solid #10b981;
}

.toast-notification.error {
    border-left: 4px solid #ef4444;
}

.toast-notification.warning {
    border-left: 4px solid #f59e0b;
}

.toast-notification.info {
    border-left: 4px solid #3b82f6;
}

/* ============================================
   PROGRESS BAR ANIMATED
   ============================================ */
.progress-animated {
    position: relative;
    overflow: hidden;
}

.progress-animated::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: progressShimmer 2s infinite;
}

@keyframes progressShimmer {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .toast-notification {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
    }
}
















