/* =====================================================
   UPDATE MODAL - Modal de actualizacion requerida
   ===================================================== */

.update-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    animation: updateFadeIn 0.3s ease;
}

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

.update-modal-container {
    background: white;
    border-radius: 28px;
    max-width: 520px;
    width: 100%;
    box-shadow:
        0 0 0 1px rgba(0, 0, 0, 0.05),
        0 50px 100px -20px rgba(0, 0, 0, 0.4),
        0 30px 60px -30px rgba(0, 0, 0, 0.35);
    overflow: hidden;
    animation: updateModalSlideIn 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
}

@keyframes updateModalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-40px) scale(0.92);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.update-modal-header {
    background: linear-gradient(135deg, #4F46E5 0%, #7C3AED 100%);
    padding: 28px 32px 32px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.update-modal-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 150%;
    height: 150%;
    background: radial-gradient(circle at center, rgba(255,255,255,0.15) 0%, transparent 65%);
    animation: updatePulse 4s ease-in-out infinite;
}

.update-modal-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
}

@keyframes updatePulse {
    0%, 100% { transform: scale(1) translateX(0); opacity: 0.6; }
    50% { transform: scale(1.15) translateX(10%); opacity: 0.3; }
}

.update-icon-container {
    width: 70px;
    height: 70px;
    background: rgba(255, 255, 255, 0.18);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 14px;
    position: relative;
    backdrop-filter: blur(10px);
    animation: updateFloat 3.5s ease-in-out infinite;
    border: 2px solid rgba(255, 255, 255, 0.25);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

@keyframes updateFloat {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-12px) rotate(5deg); }
}

.update-icon-container svg {
    width: 40px;
    height: 40px;
    color: white;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.15));
    animation: updateSpinSlow 20s linear infinite;
}

@keyframes updateSpinSlow {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.update-modal-header h2 {
    color: white;
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 10px;
    position: relative;
    z-index: 1;
    letter-spacing: -0.5px;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
}

.update-version-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.22);
    color: white;
    padding: 8px 18px;
    border-radius: 24px;
    font-size: 14px;
    font-weight: 600;
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.35);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.update-version-badge::before {
    content: '✨';
    font-size: 16px;
}

.update-modal-body {
    padding: 24px 32px;
    background: linear-gradient(to bottom, white 0%, #fafbfc 100%);
}

.update-message {
    text-align: center;
    margin-bottom: 20px;
}

.update-message h3 {
    color: #1E293B;
    font-size: 19px;
    font-weight: 700;
    margin-bottom: 8px;
    letter-spacing: -0.3px;
}

.update-message p {
    color: #64748B;
    font-size: 15px;
    line-height: 1.7;
    max-width: 400px;
    margin: 0 auto;
}

.update-warning-box {
    display: flex;
    align-items: flex-start;
    background: linear-gradient(135deg, #FFFBEB 0%, #FEF3C7 100%);
    border: 1.5px solid #FCD34D;
    border-radius: 14px;
    padding: 14px 16px;
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
}

.update-warning-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: #F59E0B;
}

.update-warning-icon {
    width: 26px;
    height: 26px;
    min-width: 26px;
    color: #F59E0B;
    margin-right: 14px;
    margin-top: 1px;
    filter: drop-shadow(0 2px 4px rgba(245, 158, 11, 0.2));
}

.update-warning-text {
    color: #92400E;
    font-size: 14px;
    line-height: 1.6;
    font-weight: 500;
}

.update-warning-text strong {
    font-weight: 700;
}

.update-modal-footer {
    padding: 0 32px 28px;
    background: linear-gradient(to bottom, #fafbfc 0%, white 100%);
}

.update-button {
    width: 100%;
    background: linear-gradient(135deg, #4F46E5 0%, #7C3AED 100%);
    color: white;
    border: none;
    padding: 15px 32px;
    border-radius: 14px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow:
        0 4px 16px rgba(79, 70, 229, 0.35),
        0 2px 6px rgba(79, 70, 229, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    position: relative;
    overflow: hidden;
    letter-spacing: 0.3px;
}

.update-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.update-button:hover:not(:disabled)::before {
    left: 100%;
}

.update-button:hover:not(:disabled) {
    transform: translateY(-3px) scale(1.02);
    box-shadow:
        0 8px 24px rgba(79, 70, 229, 0.45),
        0 4px 12px rgba(79, 70, 229, 0.3);
}

.update-button:active:not(:disabled) {
    transform: translateY(-1px) scale(0.98);
}

.update-button:disabled {
    opacity: 0.8;
    cursor: not-allowed;
}

.update-button svg {
    width: 22px;
    height: 22px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.update-button.loading svg {
    animation: updateRotate 1s linear infinite;
}

@keyframes updateRotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.update-footer-note {
    text-align: center;
    margin-top: 14px;
    color: #94A3B8;
    font-size: 13px;
    line-height: 1.6;
}

.update-footer-note strong {
    color: #4F46E5;
    font-weight: 700;
}

/* --- Responsive --- */
@media (max-width: 600px) {
    .update-modal-container {
        margin: 16px;
        border-radius: 24px;
    }

    .update-modal-header {
        padding: 32px 24px 40px;
    }

    .update-modal-header h2 {
        font-size: 26px;
    }

    .update-icon-container {
        width: 76px;
        height: 76px;
    }

    .update-icon-container svg {
        width: 44px;
        height: 44px;
    }

    .update-modal-body {
        padding: 28px 24px;
    }

    .update-modal-footer {
        padding: 0 24px 28px;
    }

    .update-button {
        padding: 16px 28px;
        font-size: 15px;
    }
}

/* --- Accessibility --- */
@media (prefers-reduced-motion: reduce) {
    .update-modal-overlay,
    .update-modal-container,
    .update-icon-container,
    .update-icon-container svg,
    .update-button::before {
        animation: none !important;
        transition: none !important;
    }
}
